CN-1135 fix: 统一各页面环形图样式

This commit is contained in:
刘洪洪
2023-07-24 11:58:06 +08:00
parent 49d759d05a
commit 4f1bc62527
2 changed files with 2 additions and 22 deletions

View File

@@ -72,33 +72,13 @@ export default {
},
methods: {
init () {
const _this = this
const dom = document.getElementById('chart')
!this.myChart && (this.myChart = echarts.init(dom))
this.chartOption = pieChartOption3
this.chartOption.series[0].data = this.chartData
this.chartOption.series[0].label = {
show: true,
position: 'center',
fontFamily: 'NotoSansHans-Medium',
fontSize: 20,
fontWeight: 500,
formatter: function () {
let num = 0
_this.chartData.forEach(t => {
num += t.value
})
return num
}
show: false
}
this.myChart.on('mouseover', function () {
_this.chartOption.series[0].label.show = false
_this.myChart.setOption(_this.chartOption)
})
this.myChart.on('mouseout', function () {
_this.chartOption.series[0].label.show = true
_this.myChart.setOption(_this.chartOption)
})
this.myChart.setOption(this.chartOption)
},
eventsByTypeData () {

View File

@@ -138,7 +138,7 @@ export const pieChartOption3 = {
avoidLabelOverlap: false,
emphasis: {
label: {
show: true,
show: false,
fontSize: 20,
fontWeight: 500,
fontFamily: 'NotoSansHans-Medium',