Namespaces that uses the Nashorn javascript engine to invoke some shared javascript code that we use to determine the background color of pulse table cells
Namespaces that uses the Nashorn javascript engine to invoke some shared javascript code that we use to determine the background color of pulse table cells
(get-background-color color-selector cell-value column-name row-index)
Get the correct color for a cell in a pulse table. This is intended to be invoked on each cell of every row in the
table. See make-color-selector
for more info.
Get the correct color for a cell in a pulse table. This is intended to be invoked on each cell of every row in the table. See `make-color-selector` for more info.
(make-color-selector {:keys [cols rows]} viz-settings)
Inputs: [{:keys [cols rows]} :- QueryResults viz-settings]
Returns a curried javascript function (object) that can be used with get-background-color
for delegating to JS
code to pick out the correct color for a given cell in a pulse table. The logic for picking a color is somewhat
complex, but defined in a set of rules in viz-settings
. There are some colors that are picked based on a
particular cell value, others affect the row, so it's necessary to call this once for the resultset and then
get-background-color
on each cell.
Inputs: [{:keys [cols rows]} :- QueryResults viz-settings] Returns a curried javascript function (object) that can be used with `get-background-color` for delegating to JS code to pick out the correct color for a given cell in a pulse table. The logic for picking a color is somewhat complex, but defined in a set of rules in `viz-settings`. There are some colors that are picked based on a particular cell value, others affect the row, so it's necessary to call this once for the resultset and then `get-background-color` on each cell.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close