Javascript 为什么热图在错误的位置显示地图?
我正在使用reactjs绘制热图。它很好用。但现在我发现它在错误的位置显示地图 库:heatmap.js 代码段:Javascript 为什么热图在错误的位置显示地图?,javascript,reactjs,heatmap,Javascript,Reactjs,Heatmap,我正在使用reactjs绘制热图。它很好用。但现在我发现它在错误的位置显示地图 库:heatmap.js 代码段: points =[ {x:1053,y:153,value:20} ] heat(){ var heatmapInstance = h337.create({ container: document.querySelector('.App') }); heatInstance = h
points =[
{x:1053,y:153,value:20}
]
heat(){
var heatmapInstance = h337.create({
container: document.querySelector('.App')
});
heatInstance = heatmapInstance;
var data = {
min:0,
max:5,
data: this.points
};
heatmapInstance.setData(data);
}
这里的问题是,我给出的位置是1053和153,但(1140290)处显示的热图圈使用screenX检查坐标,使用onMouseMove函数检查screenY参数。原因是什么
谢谢。检查页边空白、填充等@JosephD。我没有应用任何样式。是热函数数组或对象中的
数据吗???@techguru它的数组。