(filter-answer-data-structures answers query field language)
Given a list of answers + query, returns map from answers to true/false. True if query is in the answer, false if not.
Given a list of answers + query, returns map from answers to true/false. True if query is in the answer, false if not.
(get-selected-ids view-by)
Returns selected ids from view-by data
Returns selected ids from view-by data
(id-color-selected {:keys [field id->answers answer->color answer->selected?]})
Generates id-color and id-selected? functions based on viewby-info.
Generates id-color and id-selected? functions based on viewby-info.
(preprocess-answers field raw-answers)
Preproccesses answers depending on the field. For multi-selects, return type is a list of list of strings. For other types, a list of strings.
Preproccesses answers depending on the field. For multi-selects, return type is a list of list of strings. For other types, a list of strings.
(toggle-answer-selected answer->selected? visible-answers answer)
This function appropriately toggles answer->selected? when answer is clicked answer->selected? is a map from answers to true/false. Special rules: First click = select the answer. If nothing clicked, make everything clicked.
This function appropriately toggles answer->selected? when answer is clicked answer->selected? is a map from answers to true/false. Special rules: First click = select the answer. If nothing clicked, make everything clicked.
(viewby-data {:keys [full-name] :as field} data)
Produces a set of data structures / functions for view-by. answers are a list of answers, sorted by count; id->answers is a mapping from id to either one or many answers answer->count, answer->selected?, answer->color are maps from answer; used for the legend rendering. An 'answer' is mapped from a data element, eg. a bin for numbers/dates, an option for multiple/single selects.
Produces a set of data structures / functions for view-by. answers are a list of answers, sorted by count; id->answers is a mapping from id to either one or many answers answer->count, answer->selected?, answer->color are maps from answer; used for the legend rendering. An 'answer' is mapped from a data element, eg. a bin for numbers/dates, an option for multiple/single selects.
(viewby-info {:keys [full-name] :as field} data)
Produces a set of data structures / functions for view-by. answers are a list of answers, sorted by count; id->answers is a mapping from id to either one or many answers answer->count, answer->selected?, answer->color are maps from answer; used for the legend rendering. An 'answer' is mapped from a data element, eg. a bin for numbers/dates, an option for multiple/single selects.
Produces a set of data structures / functions for view-by. answers are a list of answers, sorted by count; id->answers is a mapping from id to either one or many answers answer->count, answer->selected?, answer->color are maps from answer; used for the legend rendering. An 'answer' is mapped from a data element, eg. a bin for numbers/dates, an option for multiple/single selects.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close