mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-07 11:46:09 -05:00
Fix chart labels not rendering correctly
E.g. "0.5" as a label when it should be dates
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user