score:0

Move heatmap.setData to outside your forEach:

data.forEach(function(d) {
    d.x1 = +d.x1;
    d.y1 = +d.y1;
});

heatmap.setData({
    max: maxValue,//your max here
    min: minValue,//your min here
    data: data//your data array
}); 

Related Query

More Query from same tag