|
|
@ -180,6 +180,7 @@ export default { |
|
|
|
this.pieOption = pieOption(); |
|
|
|
const {pandectData} = this; |
|
|
|
console.log(pandectData) |
|
|
|
this.pieOption.title.text = pandectData.totalResidents; |
|
|
|
this.pieData = [ |
|
|
|
{value: pandectData.permanentResiCount, name: "常住人口"}, |
|
|
|
{value: pandectData.floatingResiCount, name: "流动人口"}, |
|
|
@ -187,7 +188,7 @@ export default { |
|
|
|
this.pieOption.series[0].data = this.pieData; |
|
|
|
this.$refs.pieChart.setOption(this.pieOption); |
|
|
|
this.$refs.pieChart.myChart.setOption(this.pieOption); |
|
|
|
this.$refs.pieChart.myChart.on('mouseover', (params) => { |
|
|
|
/*this.$refs.pieChart.myChart.on('mouseover', (params) => { |
|
|
|
var oldIndex = currentIndex; |
|
|
|
var currentIndex = params.dataIndex; |
|
|
|
this.highlightPie(currentIndex, oldIndex); |
|
|
@ -195,7 +196,7 @@ export default { |
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
|
this.highlightPie(0, 1); |
|
|
|
}, 50) |
|
|
|
}, 50)*/ |
|
|
|
}, |
|
|
|
highlightPie(currentIndex, oldIndex) { |
|
|
|
this.$refs.pieChart.myChart.dispatchAction({ |
|
|
|