Fix chart labels not rendering correctly
Some checks failed
E2E Tests / e2e (push) Has been cancelled
Tests and checks on push / run-checks-and-tests (push) Has been cancelled
Updates translation progress / update-translation-progress-issue (push) Has been cancelled

E.g. "0.5" as a label when it should be dates
This commit is contained in:
Kalle
2026-07-02 21:53:07 +03:00
parent 99685e7cd5
commit 48f465b00d

View File

@@ -244,7 +244,9 @@ export default function Chart({
x: {
...scaleDefaults,
max: xAbilityLimit,
type: "linear",
// category (not linear) for date axes so ticks only land on real
// data indices instead of fractional positions like 0.5
type: xAxis === "localTime" ? "category" : "linear",
ticks: {
...scaleDefaults.ticks,
maxRotation: 0,