d3-array icon indicating copy to clipboard operation
d3-array copied to clipboard

Feature request: Duration ticks

Open runarberg opened this issue 5 years ago • 2 comments

When plotting duration values getting nice ticks is difficult. If the duration is in milliseconds but scale to (say) hours the nice tick values turn weird. There are workarounds, but they are non trivial, especially if you don’t know which time units the duration values scale to.

Being able to somehow specify scaling in duration values would make it a lot easier to plot duration values. Preferably it should be as easy as plotting time values.

runarberg avatar Nov 22 '20 18:11 runarberg

Related d3/d3-scale#177

runarberg avatar Nov 22 '20 18:11 runarberg

Things to keep in mind: Temporals are a stage 2 proposal and include a duration data structure. This will make duration arithmetic a lot easier and robust. Perhaps a new duration scale using this data structure (similar to time scale) is a better option for the future.

runarberg avatar Nov 22 '20 18:11 runarberg