From c46d6c23986019c9893bce70eb5335cecec3fcd4 Mon Sep 17 00:00:00 2001 From: fengxuefeng Date: Mon, 27 Jul 2020 15:20:04 +0800 Subject: [PATCH] save the choose effect for memory --- mindinsight/ui/src/views/train-manage/hardware-visual.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mindinsight/ui/src/views/train-manage/hardware-visual.vue b/mindinsight/ui/src/views/train-manage/hardware-visual.vue index 6fb382e..7f14218 100644 --- a/mindinsight/ui/src/views/train-manage/hardware-visual.vue +++ b/mindinsight/ui/src/views/train-manage/hardware-visual.vue @@ -329,6 +329,7 @@ export default { pieColorArr: ['#5e7ce0', '#ccc', '#a6dd82'], autoUpdateTimer: null, // Automatic refresh timer isReloading: false, // Manually refresh + legendSelected: {}, }; }, computed: { @@ -670,6 +671,7 @@ export default { } return legendStr; }, + selected: this.legendSelected, textStyle: { rich: { a: { @@ -726,6 +728,9 @@ export default { chart.chartDom = echarts.init(cpuDom, null); chart.chartDom.setOption(option, true); chart.chartDom.resize(); + chart.chartDom.on('legendselectchanged', (obj) => { + this.legendSelected = obj.selected; + }); } }); }, -- GitLab