fix: 折线图初始化逻辑优化

This commit is contained in:
@changcode
2023-01-10 09:20:26 +08:00
parent a31c408327
commit 9f488adcb9

View File

@@ -702,15 +702,11 @@ export default {
this.myChart = null this.myChart = null
this.chartOption = null this.chartOption = null
this.timer = setTimeout(() => { this.timer = setTimeout(() => {
if (this.lineTab) { if (this.lineTab && this.metric !== 'Sessions/s') {
if (this.lineTab === 'total' && this.metric === 'Sessions/s') {
this.init()
} else {
const data = this.mpackets.find(t => t.class === this.lineTab) const data = this.mpackets.find(t => t.class === this.lineTab)
if (data && data.positioning) { if (data && data.positioning) {
this.activeChange(data, data.positioning) this.activeChange(data, data.positioning)
} }
}
} else { } else {
this.init() this.init()
} }