Fix x-axis order for relative timestamps

- WIP: Will change to full times, as tick location is incorrect
This commit is contained in:
Christoph Kluge 2023-08-02 14:20:39 +02:00
parent 284a7079d6
commit 1921be661b

View File

@ -131,7 +131,13 @@
scale: 'x', scale: 'x',
space: 35, space: 35,
incrs: timeIncrs(timestep, maxX), incrs: timeIncrs(timestep, maxX),
values: (_, vals) => forNode ? vals.reverse().map(v => formatTime(v, forNode)) : vals.map(v => formatTime(v)) values: (_, vals) => {
if (forNode === true) {
return vals.map(v => formatTime(v, forNode)).reverse()
} else {
return vals.map(v => formatTime(v))
}
}
}, },
{ {
scale: 'y', scale: 'y',