pa7 / heatmap.js

🔥 JavaScript Library for HTML5 canvas based heatmaps
https://www.patrick-wied.at/static/heatmapjs/
MIT License
6.22k stars 1.33k forks source link

Data aggregation inconsistency. #285

Open HeWasntOffByMuch opened 6 years ago

HeWasntOffByMuch commented 6 years ago

So I'm making a heatmap and passing an array of points to it. all of them have value equal to 1. Each max value of aggregated points is 11 after callling: Math.max(...heatmapInstance.getData().data.map((i) => i.value))

h337.instance = heatmapInstance.setData({
  max: dataMax,
  min: 0,
  data: initialData.filter(d => {
    return d.type === settings.display.mode || settings.display.mode === enums.POINT_TYPE.ALL;
  })
});

and, this is unclear now, heatmap looks in one of 2 ways: desired look bad render

is there anything I'm forgetting?

HeWasntOffByMuch commented 6 years ago

@pa7 Looks like the bad render happens every time getValueAt is called before rendering or after 3 successful renders