echarts异步加载数据,饼图不自动轮播解决方法
app
.currentIndex
= -1;
var n
=res
.data
.resultData
.length
;
function loopPie() {
var dataLen
= n
;
myChart
.dispatchAction({
type
: "downplay",
seriesIndex
: 0,
dataIndex
: app
.currentIndex
});
app
.currentIndex
= (app
.currentIndex
+ 1) % dataLen
;
myChart
.dispatchAction({
type
: "highlight",
seriesIndex
: 0,
dataIndex
: app
.currentIndex
});
}
转载请注明原文地址: https://mac.8miu.com/read-491410.html