【发布时间】:2017-06-22 10:42:55
【问题描述】:
我创建了一个基于来自@potatopeelings 的this helpful answer 的带区域范围(条纹)图表。
但是它基于 ChartJS v2.1,当我更新到 ChartJS v2.6 - 其他要求(注释)所必需的 - 自定义图表类型中断。
示例
ChartJSv2.1 - http://jsfiddle.net/u20cfpcd/
ChartJSv2.6 - http://jsfiddle.net/cjweb/99nc8atn/
这些换行符:
Chart.elements.Line.prototype.lineToNextPoint.apply(...)
Chart.controllers.line.prototype.updateBezierControlPoints.apply(...)
我认为 Line 原型现在应该使用“draw”,但我无法解决。
有什么帮助吗?我给你买一大口! ;)
【问题讨论】:
-
我添加了
console.log(Chart.elements.Line.prototype);,似乎lineToNextPoint函数已从prototype中删除。
标签: javascript canvas charts chart.js