You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use vega and it doesn't appear to be possible to format axis ticks (and other objects such as tooltips, text marks) as duration.
Consider a data column that contains the amount of seconds elapsed (an integer representing the duration in seconds), we would like to format the ticks as d.hh:mm:ss
But this doesn't appear possible.
The type is number and not Date, so we cannot use time formats.
Even if we convert our integer to a Date, it's still not right because durations shouldn't be formatted like dates.
At first glance, you might think that we could use the format '%d.%H:%M:%S'. However, this won't work if the duration is greater than 31 days, because %d represents the day of the month, whereas what we really want is to show the total number of elapsed days.
I think the right solution would be to have a native format for durations (integer as seconds).
The text was updated successfully, but these errors were encountered:
We use vega and it doesn't appear to be possible to format axis ticks (and other objects such as tooltips, text marks) as duration.
Consider a data column that contains the amount of seconds elapsed (an integer representing the duration in seconds), we would like to format the ticks as d.hh:mm:ss
But this doesn't appear possible.
The type is number and not Date, so we cannot use time formats.
Even if we convert our integer to a Date, it's still not right because durations shouldn't be formatted like dates.
At first glance, you might think that we could use the format '%d.%H:%M:%S'. However, this won't work if the duration is greater than 31 days, because %d represents the day of the month, whereas what we really want is to show the total number of elapsed days.
I think the right solution would be to have a native format for durations (integer as seconds).
The text was updated successfully, but these errors were encountered: