From 78a723dde7592c21e548d39f619c82541e67b4f1 Mon Sep 17 00:00:00 2001 From: zdl <3489966805@qq.com> Date: Fri, 26 Dec 2025 16:31:22 +0800 Subject: [PATCH] =?UTF-8?q?style(MainBusinessAnalysis):=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E4=B8=BB=E8=90=A5=E4=B8=9A=E5=8A=A1=E9=A5=BC=E5=9B=BE?= =?UTF-8?q?=E5=B8=83=E5=B1=80=E9=81=BF=E5=85=8D=E9=81=AE=E6=8C=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 简化标题为"主营业务构成(报告期)",移除冗余副标题 - 图例从左侧垂直改为底部水平排列,避免与饼图重叠 - 饼图居中显示(center: 50%, 48%) - 饼图标签简化为仅显示百分比 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../components/MainBusinessAnalysis.tsx | 4 +-- .../FinancialPanorama/utils/chartOptions.ts | 25 +++++++++---------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/views/Company/components/FinancialPanorama/components/MainBusinessAnalysis.tsx b/src/views/Company/components/FinancialPanorama/components/MainBusinessAnalysis.tsx index efd90031..fc507f98 100644 --- a/src/views/Company/components/FinancialPanorama/components/MainBusinessAnalysis.tsx +++ b/src/views/Company/components/FinancialPanorama/components/MainBusinessAnalysis.tsx @@ -248,8 +248,8 @@ export const MainBusinessAnalysis: React.FC = ({ })); const pieOption = getMainBusinessPieOption( - `主营业务构成 - ${latestPeriod.report_type}`, - dataSource === 'industry' ? '按行业分类' : '按产品分类', + `主营业务构成(${latestPeriod.report_type})`, + '', pieData ); diff --git a/src/views/Company/components/FinancialPanorama/utils/chartOptions.ts b/src/views/Company/components/FinancialPanorama/utils/chartOptions.ts index 06465099..09b77af2 100644 --- a/src/views/Company/components/FinancialPanorama/utils/chartOptions.ts +++ b/src/views/Company/components/FinancialPanorama/utils/chartOptions.ts @@ -238,22 +238,18 @@ const BLACK_GOLD_PIE_COLORS = chartTheme.goldSeries; */ export const getMainBusinessPieOption = ( title: string, - subtitle: string, + _subtitle: string, data: { name: string; value: number }[] ) => { return { title: { text: title, - subtext: subtitle, left: 'center', + top: 0, textStyle: { color: fui.gold, fontSize: 14, }, - subtextStyle: { - color: '#A0AEC0', - fontSize: 12, - }, }, tooltip: { trigger: 'item', @@ -269,26 +265,29 @@ export const getMainBusinessPieOption = ( }, }, legend: { - orient: 'vertical', - left: 'left', - top: 'center', + orient: 'horizontal', + bottom: 0, + left: 'center', textStyle: { color: '#E2E8F0', - fontSize: 12, + fontSize: 11, }, + itemWidth: 12, + itemHeight: 12, + itemGap: 8, }, color: BLACK_GOLD_PIE_COLORS, series: [ { type: 'pie', - radius: '55%', - center: ['55%', '50%'], + radius: '50%', + center: ['50%', '48%'], data: data, label: { show: true, color: '#E2E8F0', fontSize: 11, - formatter: '{b}: {d}%', + formatter: '{d}%', }, labelLine: { lineStyle: {