openskope / skope-interface

The new SKOPE web portal interface.
https://www.openskope.org
4 stars 2 forks source link

Timeline labels of the plots should use the temporal resolution of the dataset. #214

Closed Zodiase closed 6 years ago

Zodiase commented 6 years ago

See https://github.com/openskope/SKOPE/issues/23 for the problem description.

Zodiase commented 6 years ago

Hopefully there is an overwrite for the hovered label. Otherwise the values for the x-axis needs to be replaced by year integers, instead of the dates used right now.

Zodiase commented 6 years ago

https://plot.ly/javascript/reference/#layout-xaxis-hoverformat explains layout.xaxis.hoverformat could be used to customize how the hover label is composed. For dates, the formatting syntax is here https://github.com/d3/d3-time-format/blob/master/README.md#locale_format.

Zodiase commented 6 years ago

Only hoverformat is using the resolution specific format and tickformat should not. Otherwise when zoomed in, "Jan 2000", "Feb 2000" would all be formatted as "2000", resulting multiple "2000"s appearing on the x-axis.