refactor(ForecastReport): 合并营收/利润趋势与增长率图表
- 新增 IncomeProfitGrowthChart 合并组件 - 柱状图显示营业收入(左Y轴) - 折线图显示净利润(左Y轴,渐变填充) - 虚线显示增长率(右Y轴,红涨绿跌) - 布局调整:合并图表独占一行,EPS/PE-PEG 两列 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -7,8 +7,7 @@ import { Box, SimpleGrid, HStack, Heading, Skeleton, IconButton } from '@chakra-
|
||||
import { RefreshCw } from 'lucide-react';
|
||||
import { stockService } from '@services/eventService';
|
||||
import {
|
||||
IncomeProfitChart,
|
||||
GrowthChart,
|
||||
IncomeProfitGrowthChart,
|
||||
EpsChart,
|
||||
PePegChart,
|
||||
DetailTable,
|
||||
@@ -94,12 +93,20 @@ const ForecastReport: React.FC<ForecastReportProps> = ({ stockCode: propStockCod
|
||||
|
||||
{/* 图表区域 */}
|
||||
{data && (
|
||||
<SimpleGrid columns={{ base: 1, md: 2 }} spacing={4}>
|
||||
<IncomeProfitChart data={data.income_profit_trend} />
|
||||
<GrowthChart data={data.growth_bars} />
|
||||
<EpsChart data={data.eps_trend} />
|
||||
<PePegChart data={data.pe_peg_axes} />
|
||||
</SimpleGrid>
|
||||
<>
|
||||
{/* 合并图表:营收/利润/增长率 */}
|
||||
<Box mb={4}>
|
||||
<IncomeProfitGrowthChart
|
||||
incomeProfitData={data.income_profit_trend}
|
||||
growthData={data.growth_bars}
|
||||
/>
|
||||
</Box>
|
||||
{/* EPS 和 PE/PEG */}
|
||||
<SimpleGrid columns={{ base: 1, md: 2 }} spacing={4}>
|
||||
<EpsChart data={data.eps_trend} />
|
||||
<PePegChart data={data.pe_peg_axes} />
|
||||
</SimpleGrid>
|
||||
</>
|
||||
)}
|
||||
|
||||
{/* 详细数据表格 */}
|
||||
|
||||
Reference in New Issue
Block a user