diff --git a/src/family/components/TrendChart.tsx b/src/family/components/TrendChart.tsx new file mode 100644 index 0000000..de09f37 --- /dev/null +++ b/src/family/components/TrendChart.tsx @@ -0,0 +1,70 @@ +import React from 'react'; +import { + LineChart, + Line, + XAxis, + YAxis, + CartesianGrid, + Tooltip, + ResponsiveContainer, +} from 'recharts'; + +interface TrendChartProps { + title: string; + data: Array<{ + date: string; + value: number; + label?: string; + }>; + dataKey?: string; + color?: string; + height?: number; +} + +/** + * 趋势图表组件 + * 用于展示情绪、用药依从性等趋势 + */ +export const TrendChart: React.FC = ({ + title, + data, + dataKey = 'value', + color = '#1890ff', + height = 300, +}) => { + return ( +
+

{title}

+ + + + + + + + + +
+ ); +};