|
@ -115,7 +115,10 @@ export default { |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
window.mainData = mainData; |
|
|
window.mainData = mainData; |
|
|
//console.log("--------------",mainData); |
|
|
console.log('mainData',mainData) |
|
|
|
|
|
chartsStatistics.title.text = `{tb|${total}}`; |
|
|
|
|
|
chartsStatistics.title.subtext = "{zb|总数}"; |
|
|
|
|
|
|
|
|
chartsStatistics.legend.data = lengData; |
|
|
chartsStatistics.legend.data = lengData; |
|
|
chartsStatistics.series[0].data = mainData; |
|
|
chartsStatistics.series[0].data = mainData; |
|
|
|
|
|
|
|
@ -123,17 +126,17 @@ export default { |
|
|
if (params.componentType == 'graphic') { |
|
|
if (params.componentType == 'graphic') { |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
chartsStatistics.title.text = params.percent + "%"; |
|
|
chartsStatistics.title.text = `{tb|${params.percent}%}`; |
|
|
chartsStatistics.title.subtext = params.data.name; |
|
|
chartsStatistics.title.subtext = `{zb|${params.data.name}}`; |
|
|
chartsStatistics.title.left = "22%"; |
|
|
// chartsStatistics.title.left = "22%"; |
|
|
myChart.setOption(chartsStatistics); |
|
|
myChart.setOption(chartsStatistics); |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
// 用户鼠标移出时,重新开始自动切换 |
|
|
// 用户鼠标移出时,重新开始自动切换 |
|
|
myChart.on('mouseout', (params) => { |
|
|
myChart.on('mouseout', (params) => { |
|
|
chartsStatistics.title.text = total; |
|
|
chartsStatistics.title.text = `{tb|${total}}`; |
|
|
chartsStatistics.title.subtext = "总数"; |
|
|
chartsStatistics.title.subtext = "{zb|总数}"; |
|
|
chartsStatistics.title.left = "25%"; |
|
|
// chartsStatistics.title.left = "25%"; |
|
|
myChart.setOption(chartsStatistics); |
|
|
myChart.setOption(chartsStatistics); |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|