import React from 'react'; import { LineChart as RechartsLineChart, LineChartProps as RechartsLineChartProps, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer, } from 'recharts'; export interface LineChartProps extends RechartsLineChartProps { data: ReadonlyArray; showGrid?: boolean; showLegend?: boolean; xAxis: { type: any }; line: { strokeWidth: number; type: any; activeDot: { r: number }; }; colors: string[]; } const LineChart: React.FC = (props) => { const { width, height, data, xAxis, line, showGrid, colors } = props; return ( {showGrid ? : null} {data.map(({ data, name }, index: number) => ( ))} ); }; export default LineChart;