Class: Categorical

jheatmap.decorators.Categorical

new Categorical

Categorical decorator.

Parameters:
Name Type Argument Default Description
p.values Array All posible values. Specify always in String notation.
p.colors Array Corresponding colors
p.unknown string <optional>
"white" Color for values not in options.values
Source:
  • ../js/jheatmap-1.0.0.js, line 807
Example
new jheatmap.decorators.Categorical({
                           values: ["F", "M"],
                           colors: ["pink", "blue"]
                        });

Methods

toColor

Convert a value to a color

Parameters:
Name Type Description
value string The cell value
Source:
  • ../js/jheatmap-1.0.0.js, line 820
Returns:
The corresponding color string definition.
Type
string