I'm working with d3.js and I'm using this documentation.
I use this to show the hour: %I:%M which shows the hour like 02:34.
Is there a way to remove the leading zero, in this case showing the data as 2:34 ?
I'm working with d3.js and I'm using this documentation.
I use this to show the hour: %I:%M which shows the hour like 02:34.
Is there a way to remove the leading zero, in this case showing the data as 2:34 ?
As outlined in the documentation, the default padding is zero-padding for all directives except %e (for which it is space-padding).
To change the padding type, you can append a modifier to %:
0 - zero-padding_ - space-padding- - disable paddingSo, given your example: %-I:%M.