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,