mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-10 12:44:47 -05:00
27 lines
580 B
TypeScript
27 lines
580 B
TypeScript
import { useMyTheme } from "lib/useMyTheme";
|
|
import { Line, LineChart } from "recharts";
|
|
|
|
interface WeaponLineChartProps {
|
|
getDataForChart: () => { count: number }[];
|
|
}
|
|
|
|
const WeaponLineChart: React.FC<WeaponLineChartProps> = ({
|
|
getDataForChart,
|
|
}) => {
|
|
const { themeColorHex } = useMyTheme();
|
|
|
|
return (
|
|
<LineChart width={300} height={100} data={getDataForChart()}>
|
|
<Line
|
|
type="monotone"
|
|
dataKey="count"
|
|
stroke={themeColorHex}
|
|
strokeWidth={2}
|
|
dot={false}
|
|
/>
|
|
</LineChart>
|
|
);
|
|
};
|
|
|
|
export default WeaponLineChart;
|