From 028bd29f87e7c57f89fe09a4c7cef8ae348db659 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Sat, 18 May 2024 16:22:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=9C=B0=E5=9B=BE=E7=A9=BA=E5=80=BC?= =?UTF-8?q?=E5=8C=BA=E5=9F=9F=E9=A2=9C=E8=89=B2=E8=B7=9F=E9=9A=8F=E4=B8=BB?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/chart/components/ChartComponent.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/core/frontend/src/views/chart/components/ChartComponent.vue b/core/frontend/src/views/chart/components/ChartComponent.vue index b18b5b8c5b..16d7f68849 100644 --- a/core/frontend/src/views/chart/components/ChartComponent.vue +++ b/core/frontend/src/views/chart/components/ChartComponent.vue @@ -450,11 +450,12 @@ export default { const base_json = JSON.parse(JSON.stringify(BASE_MAP)) base_json.geo.map = mapId let themeStyle = null + let panelColor = '#FFFFFF' if (this.themeStyle) { themeStyle = JSON.parse(JSON.stringify(this.themeStyle)) if (themeStyle && themeStyle.backgroundColorSelect) { - const panelColor = themeStyle.color + panelColor = themeStyle.color if (panelColor !== '#FFFFFF') { const reverseValue = reverseColor(panelColor) this.buttonTextColor = reverseValue @@ -462,7 +463,7 @@ export default { this.buttonTextColor = null } } else if (this.canvasStyleData.openCommonStyle && this.canvasStyleData.panel.backgroundType === 'color') { - const panelColor = this.canvasStyleData.panel.color + panelColor = this.canvasStyleData.panel.color if (panelColor !== '#FFFFFF') { const reverseValue = reverseColor(panelColor) this.buttonTextColor = reverseValue @@ -474,6 +475,13 @@ export default { } } const chart_option = baseMapOption(base_json, geoJson, chart, this.buttonTextColor, curAreaCode, this.currentSeriesId) + if (chart_option.geo.itemStyle.normal) { + chart_option.geo.itemStyle.normal.areaColor = `${panelColor}33` + } else { + chart_option.geo.itemStyle.normal = { + areaColor: `${panelColor}33` + } + } if (chart_option.series?.length) { const dataNames = [] chart_option.series.filter(se => se.type === 'map').forEach(se => {