fix:处理 topology tooltip 单位默认为第一个legend

This commit is contained in:
zhangyu
2023-06-20 18:02:05 +08:00
parent 2150fa71d1
commit e43b4cb70e

View File

@@ -91,6 +91,10 @@ export default {
}
})
if (chartData && this.$refs.panelChart) {
if (chartData.length) {
console.log(chartData[0][0].elements.unit)
this.chartInfo.unit = chartData[0][0].elements.unit
}
this.chartInfo.elements = elements
this.$refs.panelChart.chartData = chartData
this.$refs.panelChart.loading = false