Uncaught TypeError: Cannot read property 'linear' of undefined

最后都变了- 提交于 2019-11-30 02:35:00
Babish Shrestha

In D3 v4 it is no longer named d3.scale.linear(). Use d3.scaleLinear() instead.

Colonna Maurizio

Thanks for the answer, I've solved this error for the following code (I'm studing D3.js) :

var colorScale = d3.scale.linear().domain([0, 100]).range(["#add8e6", "blue"]);

With the following error (inside the web page) :

Uncaught TypeError: Cannot read property 'linear' of undefined at index.html:22

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