import { t } from "@lingui/macro"; import { CSSVariables } from "utils/CSSVariables"; import React from "react"; import { CartesianGrid, Legend, Line, LineChart, ResponsiveContainer, Tooltip, XAxis, YAxis, } from "recharts"; import { abilityPoints } from "utils/lists/abilityPoints"; interface StatChartProps { title: string; getEffect: (ap: number) => number; ap: number; otherAp?: number; startChartsAtZero: boolean; } const StatChart: React.FC = ({ title, ap, otherAp, getEffect, startChartsAtZero, }) => { const getData = () => abilityPoints.map((ap) => ({ name: `${ap}AP`, [title]: getEffect(ap) })); const CustomizedDot = (props: any) => { const { cx, cy, payload } = props; if (payload.name === `${ap}${t`AP`}`) { return ( ); } if (payload.name === `${otherAp}${t`AP`}`) { return ( ); } return null; }; return ( } isAnimationActive={false} /> ); }; export default StatChart;