var labelTop = { normal : { label : { show : true, position : 'center', formatter : '{b}', textStyle: { baseline : 'bottom', fontSize:30 } }, labelLine : { show : false } } }; option = { tooltip: { trigger: 'item', show:'true', formatter: "{a} <br/>{b} : {c} ({d}%)" }, color:['#DB4D4B','#EC13A6','#ffdf33','#654FC0','#00A2E8','#DE9B32','#84B059'], legend: { orient: 'vertical', y: '20%', x: 'content', textStyle: { fontWeight: 'normal', color: '#ABE3FE', fontSize:12 }, icon : 'pin', data: ['CPU', '内存', '磁盘','通道','进程','网线断开','动环'] }, calculable: true, series: [ { type: 'pie', radius: ['50%', '70%'], avoidLabelOverlap: false, label: { normal: { show: false, position: 'center', }, emphasis: { show: true, textStyle: { fontSize: '30', fontWeight: 'bold' } } }, labelLine: { normal: { show: false } }, data: [ {value: 30, name: 'CPU'}, {value: 30, name: '内存'}, {value: 30, name: '磁盘'}, {value: 40, name: '通道'}, {value: 40, name: '进程'}, {value: 50, name: '网线断开'}, {value: 80, name: '动环'} ] } ] }; var i = 0; setInterval(function() { myChart.dispatchAction({ type: 'downplay' }); myChart.dispatchAction({ type: 'highlight', // 可选,系列 index,可以是一个数组指定多个系列 //seriesIndex?: number|Array, // 可选,系列名称,可以是一个数组指定多个系列 //seriesName: 'a', // 数据的 index,如果不指定也可以通过 name 属性根据名称指定数据 //dataIndex: 0, // 可选,数据名称,在有 dataIndex 的时候忽略 name: option.legend.data[i++] }); if (option.legend.data.length === i) { i = 0; } }, 1000);