1、代码
取自http://gallery.echartsjs.com/editor.html?c=xSk8I5JcHe
// ECharts 水球图插件,需要额外插件脚本,参见上方“脚本”
// 完整配置参数参见:https://github.com/ecomfe/echarts-liquidfill
var option = {
series: [{
type: 'liquidFill',
data: [0.6, 0.5, 0.4, 0.3],
animationDuration: 0,//The second type is the update animation, which is usually used when data changes and wave height changes.
animationDurationUpdate: 2000,//They are controlled with animationEasingUpdate and animationDurationUpdate.
animationEasingUpdate: 'cubicOut'
}]
};
setTimeout(function () {
myChart.setOption({
series: [{
type: 'liquidFill',
data: [0.8, 0.6, 0.4, 0.2]//数据变化
}]
})
}, 1000);//1秒变化