From c41e1dba8f81771edfe5a7cd5e7a60c940581612 Mon Sep 17 00:00:00 2001 From: zdl <3489966805@qq.com> Date: Fri, 26 Dec 2025 13:32:57 +0800 Subject: [PATCH] =?UTF-8?q?fix(StockCompareModal):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=AF=B9=E6=AF=94=E5=9B=BE=E8=A1=A8=E5=9B=BE=E4=BE=8B=E9=A2=9C?= =?UTF-8?q?=E8=89=B2=E6=A8=A1=E7=B3=8A=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - chartOptions.ts: 完善 getCompareBarChartOption 黑金主题配置 - 添加 legend.textStyle.color 使图例文字清晰可见 - 添加 tooltip、axisLine、splitLine 等主题颜色配置 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../FinancialPanorama/utils/chartOptions.ts | 45 +++++++++++++++++-- 1 file changed, 41 insertions(+), 4 deletions(-) diff --git a/src/views/Company/components/FinancialPanorama/utils/chartOptions.ts b/src/views/Company/components/FinancialPanorama/utils/chartOptions.ts index c30a3be4..06465099 100644 --- a/src/views/Company/components/FinancialPanorama/utils/chartOptions.ts +++ b/src/views/Company/components/FinancialPanorama/utils/chartOptions.ts @@ -308,7 +308,7 @@ export const getMainBusinessPieOption = ( }; /** - * 生成对比柱状图配置 + * 生成对比柱状图配置 - 黑金主题 * @param title 标题 * @param stockName1 股票1名称 * @param stockName2 股票2名称 @@ -326,13 +326,50 @@ export const getCompareBarChartOption = ( data2: (number | undefined)[] ) => { return { - tooltip: { trigger: 'axis' }, - legend: { data: [stockName1, stockName2] }, + backgroundColor: 'transparent', + tooltip: { + trigger: 'axis', + backgroundColor: chartTheme.tooltip.bg, + borderColor: chartTheme.tooltip.border, + textStyle: { + color: '#E2E8F0', + }, + }, + legend: { + data: [stockName1, stockName2], + textStyle: { + color: '#E2E8F0', + }, + }, xAxis: { type: 'category', data: categories, + axisLine: { + lineStyle: { + color: chartTheme.axisLine, + }, + }, + axisLabel: { + color: '#A0AEC0', + }, + }, + yAxis: { + type: 'value', + axisLabel: { + formatter: '{value}%', + color: '#A0AEC0', + }, + axisLine: { + lineStyle: { + color: chartTheme.axisLine, + }, + }, + splitLine: { + lineStyle: { + color: chartTheme.splitLine, + }, + }, }, - yAxis: { type: 'value', axisLabel: { formatter: '{value}%' } }, series: [ { name: stockName1,