feat(stats): add chart form selection and pie, donut, line charts
Build, Test & Push Frontend / quality-check (push) Successful in 30s
Build, Test & Push Frontend / docker (push) Successful in 22s

Tag rows with 0 games are no longer clickable.
This commit is contained in:
lobo committed 2026-10-04 10:43:02 +02:00
1 parent 8b94a25844
commit e054e13a59
21 files changed
+815 -56

No files matched your search

+9 -3
View File
@@ -2,13 +2,19 @@ import {useTranslation} from 'react-i18next';
import {TrendingDown} from 'lucide-react';
import StatsSection from './StatsSection.jsx';
import ChartPicker from './ChartPicker.jsx';
import PileTrend from './PileTrend.jsx';
export default function TrendStats({trend}) {
/**
* @param chart LINE or BARS
* @param onChart `(form)`: shows the picker
*/
export default function TrendStats({trend, chart = 'LINE', onChart}) {
const {t} = useTranslation();
return (
<StatsSection title={t('STATS.TREND.TITLE')} icon={TrendingDown}>
<PileTrend trend={trend}/>
<StatsSection title={t('STATS.TREND.TITLE')} icon={TrendingDown}
action={onChart && <ChartPicker group="TREND" value={chart} onChange={onChart}/>}>
<PileTrend trend={trend} chart={chart}/>
</StatsSection>
);
}