From 18f07ebcc68e9043222d71dfe305926319e9cf00 Mon Sep 17 00:00:00 2001 From: zkldi <20380519+zkldi@users.noreply.github.com> Date: Tue, 21 Nov 2023 23:25:26 +0000 Subject: [PATCH] fix: lr2hook graphs have wrong x axis --- .../tables/dropdowns/components/BMSScoreDropdownParts.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/src/components/tables/dropdowns/components/BMSScoreDropdownParts.tsx b/client/src/components/tables/dropdowns/components/BMSScoreDropdownParts.tsx index 5cdbd43fc..c432aee28 100644 --- a/client/src/components/tables/dropdowns/components/BMSScoreDropdownParts.tsx +++ b/client/src/components/tables/dropdowns/components/BMSScoreDropdownParts.tsx @@ -93,7 +93,9 @@ function GraphComponent({ type, values }: { type: LampTypes; values: (number | n data={[ { id: type, - data: values.map((e, i) => ({ x: i, y: e ?? 0 })), + // x is from 0 -> 1_000; the percentXAxis function divides by 100 + // so we want this to be out of 10_000. + data: values.map((e, i) => ({ x: i * 10, y: e ?? 0 })), }, ]} />