new Linear
Linear decorator
Parameters:
Name | Type | Argument | Default | Description |
---|---|---|---|---|
p.ranges |
Array |
<optional> |
[[-2,0],[0,2]] | All the ranges wanted starting with the most negative range upwards |
p.colors |
Array |
<optional> |
[[[0,0,255],[255,255,255]],[[255,255,255],[255,0,0]] | Min and max colors for each defined range that produce gradient |
p.outColor |
Array |
<optional> |
[0,0,0] | A specific color if the value is out of the range bounds. If not defined by user, the min and max colors will be used. |
p.betweenColor |
Array |
<optional> |
[187,187,187] | A specific color if a value is between defined ranges. If not defined user it is set to black or outColor. |
- Source:
- ../js/jheatmap-1.0.0.js, line 965
Example
new jheatmap.decorators.Linear({});
Methods
-
toColor
-
Convert a value to a color
Parameters:
Name Type Description value
The cell value - Source:
- ../js/jheatmap-1.0.0.js, line 996
Returns:
The corresponding color string definition.