-
Notifications
You must be signed in to change notification settings - Fork 618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
颜色设置渐变报错 #108
Comments
网页版没有问题,不知道你说的报错具体是什么错误,可以贴一下。 |
Style.js?2b61:458 Uncaught TypeError: Failed to execute 'addColorStop' on 'CanvasGradient': The provided double value is non-finite. |
断点看一下 addColorStop 参数,截一个图 |
@Ovilia 你好,我也遇到了这个问题,请问怎么解决呢?下面附上代码: setInterval(function() { |
这个问题是由于 ECharts 动画插值不支持渐变色 |
请使用 2.0.6 版本 |
已测试,没有问题。非常感谢!!! |
"vue": "^2.6.11",
"echarts": "^4.7.0",
"echarts-liquidfill": "^2.0.5",
"typescript": "~3.8.3"
series: [{
type: 'liquidFill',
data: [{
value: 0.4,
itemStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [{
offset: 0,
color: 'red'
}, {
offset: 1,
color: 'green'
}],
global: false
}
}
}],
}]
问题:在vue mounted初始化init跟setOption的时候报错。
解决:不设置初始化,监听数据变化,在调用init跟setOption就不报错
期待:希望有一个合适的解决办法
@Ovilia 小姐姐有好的解决办法不呢
The text was updated successfully, but these errors were encountered: