d3.svg.line() error: Uncaught TypeError: Cannot read property 'line' of undefined

后端 未结 3 858
庸人自扰
庸人自扰 2020-12-17 08:42

I am using the following code to try to draw a path using d3.js I have tried various code examples on the web about the same and have been getting the same error everywhere.

3条回答
  •  时光说笑
    2020-12-17 09:10

    Make sure your code has modified in the below syntax since there is no d3.svg in version 4.

    var lineFunction = d3.line()
                         .x(function(d) { return d.x; })
                         .y(function(d) { return d.y; });
    

提交回复
热议问题