Pretty straightforward: if the column is a heatmap, get the minimum and maximum values of the column, get the value of the cell and then interpolate the background color.
However, the cell's value is converted away from a string using parseInt(value, 10), which collapses the value to an integer, losing any decimal information. This therefore means that (not so) similar values are collapsed into the same color.
For example, see the output from the example given for hot_heatmap:
The default heatmap renderer is
Pretty straightforward: if the column is a heatmap, get the minimum and maximum values of the column, get the value of the cell and then interpolate the background color.
However, the cell's value is converted away from a string using
parseInt(value, 10)
, which collapses the value to an integer, losing any decimal information. This therefore means that (not so) similar values are collapsed into the same color.For example, see the output from the example given for
hot_heatmap
:Note how each column has only three or four colors, since all numbers are truncated to either +/-2, +/-1, or 0.
This can be fixed by simply replacing
parseInt()
withparseFloat()
: