fix(StockCompareModal): 修复对比图表图例颜色模糊问题

- chartOptions.ts: 完善 getCompareBarChartOption 黑金主题配置
- 添加 legend.textStyle.color 使图例文字清晰可见
- 添加 tooltip、axisLine、splitLine 等主题颜色配置

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
zdl
2025-12-26 13:32:57 +08:00
parent 0017302e5c
commit c41e1dba8f

View File

@@ -308,7 +308,7 @@ export const getMainBusinessPieOption = (
}; };
/** /**
* 生成对比柱状图配置 * 生成对比柱状图配置 - 黑金主题
* @param title 标题 * @param title 标题
* @param stockName1 股票1名称 * @param stockName1 股票1名称
* @param stockName2 股票2名称 * @param stockName2 股票2名称
@@ -326,13 +326,50 @@ export const getCompareBarChartOption = (
data2: (number | undefined)[] data2: (number | undefined)[]
) => { ) => {
return { return {
tooltip: { trigger: 'axis' }, backgroundColor: 'transparent',
legend: { data: [stockName1, stockName2] }, tooltip: {
trigger: 'axis',
backgroundColor: chartTheme.tooltip.bg,
borderColor: chartTheme.tooltip.border,
textStyle: {
color: '#E2E8F0',
},
},
legend: {
data: [stockName1, stockName2],
textStyle: {
color: '#E2E8F0',
},
},
xAxis: { xAxis: {
type: 'category', type: 'category',
data: categories, 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: [ series: [
{ {
name: stockName1, name: stockName1,