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:
@@ -51,7 +51,10 @@ const EpsChart: React.FC<EpsChartProps> = ({ data }) => {
|
|||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
...BASE_CHART_CONFIG.legend,
|
...BASE_CHART_CONFIG.legend,
|
||||||
data: ['EPS(稀释)', '行业平均'],
|
data: [
|
||||||
|
{ name: 'EPS(稀释)', itemStyle: { color: CHART_COLORS.eps } },
|
||||||
|
{ name: '行业平均', itemStyle: { color: CHART_COLORS.epsAvg } },
|
||||||
|
],
|
||||||
bottom: 0,
|
bottom: 0,
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
|
|||||||
@@ -46,9 +46,19 @@ const PePegChart: React.FC<PePegChartProps> = ({ data }) => {
|
|||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
...BASE_CHART_CONFIG.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,
|
bottom: 0,
|
||||||
},
|
},
|
||||||
|
grid: {
|
||||||
|
left: 50,
|
||||||
|
right: 50, // 增加右侧间距,避免 PEG 轴数字被遮挡
|
||||||
|
bottom: 40,
|
||||||
|
top: 40,
|
||||||
|
containLabel: false,
|
||||||
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
...BASE_CHART_CONFIG.xAxis,
|
...BASE_CHART_CONFIG.xAxis,
|
||||||
type: 'category',
|
type: 'category',
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export const CHART_COLORS = {
|
|||||||
profit: '#F6AD55', // 利润 - 橙金色
|
profit: '#F6AD55', // 利润 - 橙金色
|
||||||
growth: '#10B981', // 增长率 - 翠绿色
|
growth: '#10B981', // 增长率 - 翠绿色
|
||||||
eps: '#DAA520', // EPS - 金菊色
|
eps: '#DAA520', // EPS - 金菊色
|
||||||
epsAvg: '#4A5568', // EPS行业平均 - 灰色
|
epsAvg: '#A0AEC0', // EPS行业平均 - 亮灰色(提高对比度)
|
||||||
pe: '#D4AF37', // PE - 金色
|
pe: '#D4AF37', // PE - 金色
|
||||||
peg: '#38B2AC', // PEG - 青色(优化对比度)
|
peg: '#38B2AC', // PEG - 青色(优化对比度)
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user