Public Access
feat(stats): add chart form selection and pie, donut, line charts
Tag rows with 0 games are no longer clickable.
This commit is contained in:
1 parent
8b94a25844
commit
e054e13a59
21 files changed
+815
-56
No files matched your search
@@ -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>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user