fix: lr2hook graphs have wrong x axis

This commit is contained in:
zkldi
2023-11-21 23:25:26 +00:00
parent ccebb1d01d
commit 18f07ebcc6
@@ -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 })),
},
]}
/>