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