You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although point (500,500) have value 0, the color after rendering is same the color of point (600,600) having value 1
Expected result:
Point (500,500) has value 0, it's color after rendering must be transparent, due to value 0
Point(600,600) has value 1, it's color after rendering must be rgb(255,0,0) as gradient config
Now I must set value of (500,500) point to 0.00001 instead of 0 to render the exprected result image
v2.0.5
If I normalize data to [0, 1] before draw heatmap, point having value = 0 is not exactly rendering.
Output
Although point (500,500) have value 0, the color after rendering is same the color of point (600,600) having value 1
Expected result:
Point (500,500) has value 0, it's color after rendering must be transparent, due to value 0
Point(600,600) has value 1, it's color after rendering must be
rgb(255,0,0)
as gradient configNow I must set value of (500,500) point to 0.00001 instead of 0 to render the exprected result image
Reason
When I debug I found the issue from that line
heatmap.js/src/data.js
Line 29 in 4e64f5a
I think if
_valueField
value is not in dataPoint's keys or cannot get value fromdataPoint
object, casting to 0 is betterNow if value of
dataPoint[this._valueField]
is 0,dataPoint[this._valueField] || 1
is 1 and cause the rendering is not exactThank you for your repo, it's amazing library
Please review and fix this issue
The text was updated successfully, but these errors were encountered: