/* eslint-disable @typescript-eslint/no-explicit-any */ import { useMemo } from 'react' import { Area, AreaChart, ResponsiveContainer, XAxis, YAxis } from 'recharts' const SimpleAreaChart = ({ color, data, name, xKey, yKey, }: { color: string data: any[] name: string xKey: string yKey: string }) => { const flipGradientCoords = useMemo(() => { if (!data.length) return return data[0][yKey] <= 0 && data[data.length - 1][yKey] <= 0 }, [data]) return ( { const adjustment = (dataMax - dataMin) / 5 return [dataMin - adjustment, dataMax + adjustment] }} dataKey={yKey} hide /> ) } export default SimpleAreaChart