d3.mouse is not a function

你。 提交于 2021-02-09 09:20:02

问题


Upgraded d3 library and now getting an error for executing the following code

console.log(`\n${JSON.stringify(d3.mouse)}\n`);
const mouse = d3.mouse(this);

Getting

undefined

d3.mouse is not a function

And it is not defined anywhere. I went trough d3 exports and this function is not really exported from anywhere.


回答1:


d3.mouse was removed in d3v6, you should use d3.pointer(event)



来源:https://stackoverflow.com/questions/65134858/d3-mouse-is-not-a-function

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!