From 98c219c17b3c7872aef3ba94a2e19c67ab072538 Mon Sep 17 00:00:00 2001 From: Free-sss <630042479@qq.com> Date: Wed, 27 Aug 2025 21:52:06 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E5=8D=B1=E9=99=A9=E6=88=BF?= =?UTF-8?q?=E5=AD=90=E5=9C=86=E7=8E=AF=E6=9B=B4=E6=96=B0=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=E8=AF=B7=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PieCenterHaz/config.ts | 13 +- .../PieCenterHaz/index.vue | 221 +++++++++++++----- 2 files changed, 166 insertions(+), 68 deletions(-) diff --git a/src/packages/components/Charts/HazardousChemicalsSpace/PieCenterHaz/config.ts b/src/packages/components/Charts/HazardousChemicalsSpace/PieCenterHaz/config.ts index 50963a9..a24b1ba 100644 --- a/src/packages/components/Charts/HazardousChemicalsSpace/PieCenterHaz/config.ts +++ b/src/packages/components/Charts/HazardousChemicalsSpace/PieCenterHaz/config.ts @@ -45,7 +45,7 @@ const option = { left: '60%', // 默认更靠左一点,避免截断 top: 'center', icon: 'rect', - showEmpty:false, + showEmpty: false, // itemWidth: 10, itemHeight: 8, itemGap: 5, @@ -69,8 +69,9 @@ const option = { center: ['30%', '48%'], silent: true, z: 1, - data: [{ value: 1, name: '', itemStyle: { - color: { + data: [{ + value: 1, name: '', itemStyle: { + color: { type: 'linear', x: 0, y: 0, @@ -82,7 +83,8 @@ const option = { { offset: 1, color: 'rgba(200, 200, 200, 0.01)' }, ] } - } }], + } + }], label: { show: false }, labelLine: { show: false } }, @@ -160,8 +162,7 @@ const option = { show: false, }, itemStyle: { shadowBlur: 12, shadowColor: 'rgba(0, 0, 0, 0.35)' } - }, - data: dataJson.source + } }, // 内部渐变装饰环(在空洞边缘,提升质感) { diff --git a/src/packages/components/Charts/HazardousChemicalsSpace/PieCenterHaz/index.vue b/src/packages/components/Charts/HazardousChemicalsSpace/PieCenterHaz/index.vue index 8cb57a3..a71390c 100644 --- a/src/packages/components/Charts/HazardousChemicalsSpace/PieCenterHaz/index.vue +++ b/src/packages/components/Charts/HazardousChemicalsSpace/PieCenterHaz/index.vue @@ -1,16 +1,13 @@ \ No newline at end of file