d3.svg.line()错误:TypeError: d3.svg.line is not a function
错误 not is Function line TypeError SVG D3
2023-09-11 14:18:38 时间
var line_generator= d3.svg.line() .x(function (d,i) { return i; }) .y(function (d) { return d; })
错误:TypeError: d3.svg.line is not a function
原因:
你使用D3 v4 。从版本4开始,没有 d3.svg ,因此出现错误消息。您要查找的行生成器现在定义为 d3.line()。
如果您仍在使用版本3,则会是 d3.svg.line()。
解决方法:
var line_generator= d3.line() .x(function (d,i) { return i; }) .y(function (d) { return d; })
如果还有其他函数变动看这里:案例查询
比如(https://blockbuilder.org/clhenrick/da9301dc7f5304c6b2083ddcbc7e1baf):
d3.scale.linear() 变为d3.scaleLinear()
相关文章
- nginx File not found 错误
- 服务器磁盘扩展卷时遭遇“There is not enough space available on the disk(s) to complete this operation.”错误
- 解决ora-01034和ora-27101错误
- 部署 SAP UI5 应用到 SAP BTP 时遇到的 fiori not found 错误消息
- SAP Fiori Launchpad 错误消息 - 400 File is not contained in a resource root
- 错误消息sales area is not assigned for the header product
- CRM中间件里parent not ok的错误消息如何处理
- 错误消息Form of address 0001 not designated for organization
- 解决The type or namespace name 'XXXX' does not exist in the namespace 'XXXXXXXXX' 的错误
- SAP UI5 clone 到 WebIDE后,加载 sap-ui-core.js 后出现 404 Not found 错误的原因
- SAP Fiori Launchpad 错误消息 - 400 File is not contained in a resource root
- Angular 服务器端渲染应用的一个错误消息 type ReferenceError - localStorage is not defined
- Angular compiler报的一个错误消息:Component XX is not part of any NgModule
- 成功解决dos内的输入ipconfig出现错误:不是内部或外部命令……
- 全网多种方式解决The requested resource [/] is not available的错误
- eclipse git 一个错误:the current branch is not configured for pull No value for key branch.xxx.merge found
- 出现“Could not resolve host: www.github.com; Unknown error”错误解决
- WEB自动化(6)WEB自动化及脚本在Linux系统上正常运行一段时间后报session not created from tab crashed 的错误的解决办法
- Spring5源码 Could not resolve org.jetbrains.dokka:integration:0.9.15 错误现象