ecomfe / echarts-liquidfill

Liquid Fill Chart for Apache ECharts
https://ecomfe.github.io/echarts-liquidfill/example/
BSD 3-Clause "New" or "Revised" License
1.44k stars 621 forks source link

在Echarts4.0+以上会报错,不能执行渲染 #47

Closed oo2o closed 6 years ago

oo2o commented 6 years ago

在Echarts4.0+以上会报错,不能执行渲染

OakWang commented 6 years ago

有解决办法吗?一直刷这个错: echarts-liquidfill.min.js:1 Uncaught DOMException: Failed to execute 'arc' on 'CanvasRenderingContext2D': The radius provided (-12) is negative.

OverNothing commented 6 years ago

Uncaught DOMException: Failed to execute 'arc' on 'CanvasRenderingContext2D': The radius provided (-12) is negative. 我在使用下面链接里的例子时遇到了这个问题,有什么解决方案吗? http://gallery.echartsjs.com/editor.html?c=xH1-HeJj2G&v=2

liuzhen23 commented 6 years ago

我也是同样的问题

Ovilia commented 6 years ago

请使用最新发布的 2.0.1 版本,与 ECharts 4.1.0 版本兼容。

clark1201 commented 6 years ago

package.json "echarts": "^4.1.0", "echarts-liquidfill": "^2.0.1",

index.js

import echartsliquidfill from'echarts-liquidfill/dist/echarts' import 'echarts-liquidfill/dist/echarts-liquidfill' const p1 = $(.lf)[0] var option = { series: [{ type: 'liquidFill', data: [0.6] }] }; const lf = echartsliquidfill.init(p1) lf.setOption(option)

Component series.liquidFill not exists. Load it first.