How to display scale as time unit integers? #9525
-
I'm completely new to Vega-Lite and a little overwhelmed by the complexity, so please forgive me if this is a silly question! I'm plotting parameters for a process which runs from time 0 to some arbitrary time, say 4500 minutes. I would like to display the time axis with just an integer shown for each hour, converting the "minutes from start" value into whole hours (i.e. just 0,1,2,3...73,74,75). Setting the axis |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I found a solution, by surrendering to the time lords and passing a UTC time as the value for the x axis (as time passed from 2012/01/01) and formatting the x axis thusly:
The key was finding |
Beta Was this translation helpful? Give feedback.
I found a solution, by surrendering to the time lords and passing a UTC time as the value for the x axis (as time passed from 2012/01/01) and formatting the x axis thusly:
The key was finding
labelExpr
andtimeFormat
in theaxis
documentation - and... tada!