From 952d1804ad4db4813b8371066b917f3428c4b161 Mon Sep 17 00:00:00 2001 From: glax Date: Mon, 26 May 2025 19:56:04 +0200 Subject: [PATCH] Proper Scale for Charts --- src/components/PlayerGameStatsDrawer.tsx | 3 ++- src/components/PlayerStatsDrawer.tsx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/PlayerGameStatsDrawer.tsx b/src/components/PlayerGameStatsDrawer.tsx index 744fafb..efb9b86 100644 --- a/src/components/PlayerGameStatsDrawer.tsx +++ b/src/components/PlayerGameStatsDrawer.tsx @@ -30,7 +30,8 @@ export default function PlayerGameStatsDrawer({player, game, open, setOpen} : {p new Date(t.timeStamp))??[], scaleType: "utc", label: "Date"}]} - series={[{data: trackedTime?.map(t => Number(t.timePlayed))??[], label: "Minutes Played"}]} + yAxis={[{label: "Minutes Played", scaleType: "linear", min: 0}]} + series={[{data: trackedTime?.map(t => Number(t.timePlayed))??[], label: game?.name}]} sx={{height: "80%"}}/> diff --git a/src/components/PlayerStatsDrawer.tsx b/src/components/PlayerStatsDrawer.tsx index c3837eb..ac8a26c 100644 --- a/src/components/PlayerStatsDrawer.tsx +++ b/src/components/PlayerStatsDrawer.tsx @@ -78,7 +78,7 @@ export function PlayerStatsDrawer({player, open, setOpen}: { />