diff --git a/nezha-fronted/src/components/common/project/meta2d/js/meta2dMain.js b/nezha-fronted/src/components/common/project/meta2d/js/meta2dMain.js index a83c77295..9ba18184c 100644 --- a/nezha-fronted/src/components/common/project/meta2d/js/meta2dMain.js +++ b/nezha-fronted/src/components/common/project/meta2d/js/meta2dMain.js @@ -223,6 +223,15 @@ export default { if (!pen.data.tooltip.legends.length) { return } + let positionShow = false + pen.data.tooltip.legends.forEach(item=>{ + if (item.legend) { + positionShow = true + } + }) + if (!positionShow) { + return; + } this.chartParams = { ...pen.data.tooltip, unit: this.params.unit, diff --git a/nezha-fronted/src/components/common/project/meta2d/js/topoUtil.js b/nezha-fronted/src/components/common/project/meta2d/js/topoUtil.js index 3d306b25b..02c691d00 100644 --- a/nezha-fronted/src/components/common/project/meta2d/js/topoUtil.js +++ b/nezha-fronted/src/components/common/project/meta2d/js/topoUtil.js @@ -10,6 +10,7 @@ export default { }, initEdit (id) { bus.$emit('changeSelectPens', []) + getTopology(id).active([]) getTopology(id).lock(0) getTopology(id).stopAnimate() if (getTopology(id).data().pens) {