Skip to content

Commit

Permalink
fix: lr2hook graphs have wrong x axis
Browse files Browse the repository at this point in the history
  • Loading branch information
zkrising committed Nov 21, 2023
1 parent 51e6e74 commit b1e3d72
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 })),
},
]}
/>
Expand Down

0 comments on commit b1e3d72

Please sign in to comment.