Values that are larger than the maximum specified for the heatmap are not colorized correctly. This happens because a ctx.globalAlpha greater than 1 is ignored, so the color of the previously drawn circle is used again. Values that are larger than the maximum value should be drawn in the same colour as the maximum value.
This picture demonstrates the current behaviour:
This picture demonstrates the expected behaviour (at least what I would expect):
steps to reproduce this issue:
set heatmap max value to 2 instead of 18: var heat = simpleheat('canvas').data(data).max(2) (demo/index.html, 42)
disable adding data on mouseover by commenting out demo/index.html ll.54-56
replace demo/data.js with the following:
var data = [[20, 20, 2], [120, 120, 3], [220, 220, 1], [320, 320, 3]];
open demo/index.html in your browser
I also opened a pull request with a fix for this issue.
Values that are larger than the maximum specified for the heatmap are not colorized correctly. This happens because a ctx.globalAlpha greater than 1 is ignored, so the color of the previously drawn circle is used again. Values that are larger than the maximum value should be drawn in the same colour as the maximum value.
This picture demonstrates the current behaviour:
This picture demonstrates the expected behaviour (at least what I would expect):
steps to reproduce this issue:
var heat = simpleheat('canvas').data(data).max(2)
(demo/index.html, 42)I also opened a pull request with a fix for this issue.