From 82005a43a379282fdc4d5594cfcbbf878efc8cc9 Mon Sep 17 00:00:00 2001 From: d266377 Date: Fri, 30 Jan 2026 12:45:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=80=81=E5=8A=BF=E6=84=9F=E7=9F=A5=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0-=E5=BC=80=E6=BA=90=E7=94=9F=E6=80=81=E4=B8=8E?= =?UTF-8?q?=E8=B4=A1=E7=8C=AE=E4=BB=B7=E5=80=BC=E5=85=A8=E6=99=AF-?= =?UTF-8?q?=E5=9F=BA=E7=A1=80=E8=AE=BE=E6=96=BD=E8=A6=86=E7=9B=96=E7=8E=87?= =?UTF-8?q?=E6=A0=87=E6=B3=A8=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/InfrastructureCoverageChart.vue | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/views/Jyh/ecosystem/components/InfrastructureCoverageChart.vue b/src/views/Jyh/ecosystem/components/InfrastructureCoverageChart.vue index 4719ee1..413d8ca 100644 --- a/src/views/Jyh/ecosystem/components/InfrastructureCoverageChart.vue +++ b/src/views/Jyh/ecosystem/components/InfrastructureCoverageChart.vue @@ -216,18 +216,23 @@ const initInfrastructureChart = () => { } }, legend: { - data: infrastructureData.value.map(d => d.name), + data: infrastructureData.value.map(d => ({ + name: d.name, + itemStyle: { + color: d.color + } + })), orient: 'vertical', right: '5%', top: 'center', - itemWidth: 12, // 图例方块宽度 - itemHeight: 12, // 图例方块高度 - itemGap: 15, // 图例项之间的间距 - icon: 'circle', // 图例形状:'circle'圆形, 'rect'方形, 'roundRect'圆角方形 + itemWidth: 12, // 图例方块宽度 + itemHeight: 12, // 图例方块高度 + itemGap: 15, // 图例项之间的间距 + icon: 'circle', // 图例形状:'circle'圆形, 'rect'方形, 'roundRect'圆角方形 textStyle: { color: '#333', fontSize: 12, - padding: [0, 0, 0, 8] // 文字与图标的间距 + padding: [0, 0, 0, 8] // 文字与图标的间距 } }, graphic: [