fix(ForecastReport): 修复 EPS 和 PE/PEG 图表显示问题

- EpsChart: 将行业平均颜色从深灰改为亮灰色提高对比度
- EpsChart: 在 legend 中明确指定颜色
- PePegChart: 在 legend 中明确指定 PE 和 PEG 的颜色
- PePegChart: 增加右侧间距避免 PEG 轴数字被遮挡

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
zdl
2025-12-29 10:31:13 +08:00
parent e5d9cf1f2e
commit 50567229c9
3 changed files with 16 additions and 3 deletions

View File

@@ -51,7 +51,10 @@ const EpsChart: React.FC<EpsChartProps> = ({ data }) => {
},
legend: {
...BASE_CHART_CONFIG.legend,
data: ['EPS(稀释)', '行业平均'],
data: [
{ name: 'EPS(稀释)', itemStyle: { color: CHART_COLORS.eps } },
{ name: '行业平均', itemStyle: { color: CHART_COLORS.epsAvg } },
],
bottom: 0,
},
xAxis: {

View File

@@ -46,9 +46,19 @@ const PePegChart: React.FC<PePegChartProps> = ({ data }) => {
},
legend: {
...BASE_CHART_CONFIG.legend,
data: ['PE', 'PEG'],
data: [
{ name: 'PE', itemStyle: { color: CHART_COLORS.pe } },
{ name: 'PEG', itemStyle: { color: CHART_COLORS.peg } },
],
bottom: 0,
},
grid: {
left: 50,
right: 50, // 增加右侧间距,避免 PEG 轴数字被遮挡
bottom: 40,
top: 40,
containLabel: false,
},
xAxis: {
...BASE_CHART_CONFIG.xAxis,
type: 'category',

View File

@@ -22,7 +22,7 @@ export const CHART_COLORS = {
profit: '#F6AD55', // 利润 - 橙金色
growth: '#10B981', // 增长率 - 翠绿色
eps: '#DAA520', // EPS - 金菊色
epsAvg: '#4A5568', // EPS行业平均 - 灰色
epsAvg: '#A0AEC0', // EPS行业平均 - 灰色(提高对比度)
pe: '#D4AF37', // PE - 金色
peg: '#38B2AC', // PEG - 青色(优化对比度)
};