fix: disable alarm chart refresh animation
This commit is contained in:
@@ -1266,16 +1266,18 @@ export default {
|
||||
if (!this.$refs.alarmPieChart) {
|
||||
return
|
||||
}
|
||||
if (this.alarmPieChart) {
|
||||
this.alarmPieChart.dispose()
|
||||
}
|
||||
if (!this.alarmPieChart) {
|
||||
this.alarmPieChart = echarts.init(this.$refs.alarmPieChart)
|
||||
}
|
||||
const names = this.alarmFrequencyTop5.map(item => item.name)
|
||||
const shortNames = names.map(name => this.formatAlarmChartName(name))
|
||||
const values = this.alarmFrequencyTop5.map(item => item.value)
|
||||
const maxValue = Math.max(...values, 1)
|
||||
const yAxisMax = Math.max(2, Math.ceil(maxValue / 2) * 2)
|
||||
this.alarmPieChart.setOption({
|
||||
animation: false,
|
||||
animationDuration: 0,
|
||||
animationDurationUpdate: 0,
|
||||
grid: {
|
||||
left: 34,
|
||||
right: 12,
|
||||
|
||||
Reference in New Issue
Block a user