From 5d7da59142922dd6664b2c9df9100a0d6f3d114b Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Wed, 4 Jan 2023 17:52:43 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=A7=86=E5=9B=BE):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E8=A7=86=E5=9B=BE=E7=BF=BB=E9=A1=B5=E6=8F=90=E7=A4=BA=E9=98=B2?= =?UTF-8?q?=E6=AD=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/chart/components/ChartComponent.vue | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/frontend/src/views/chart/components/ChartComponent.vue b/frontend/src/views/chart/components/ChartComponent.vue index 6b5057a14f..46c9c1ec02 100644 --- a/frontend/src/views/chart/components/ChartComponent.vue +++ b/frontend/src/views/chart/components/ChartComponent.vue @@ -332,12 +332,14 @@ export default { }) return } - if (this.canvasStyleData.panel.themeColor === 'dark') { - chart_option.legend['pageIconColor'] = '#ffffff' - chart_option.legend['pageIconInactiveColor'] = '#8c8c8c' - } else { - chart_option.legend['pageIconColor'] = '#000000' - chart_option.legend['pageIconInactiveColor'] = '#8c8c8c' + if (chart_option.legend) { + if (this.canvasStyleData.panel.themeColor === 'dark') { + chart_option.legend['pageIconColor'] = '#ffffff' + chart_option.legend['pageIconInactiveColor'] = '#8c8c8c' + } else { + chart_option.legend['pageIconColor'] = '#000000' + chart_option.legend['pageIconInactiveColor'] = '#8c8c8c' + } } this.myEcharts(chart_option) this.$nextTick(() => (this.linkageActive()))