-
-
Notifications
You must be signed in to change notification settings - Fork 112
Fix date handling #804
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix date handling #804
Conversation
cc6d4ea
to
868fa0d
Compare
de6a072
to
537e73f
Compare
986844f
to
f45f92d
Compare
@nicolaskruchten @dmt0 ready for review I will tackle issue 803 incrementally |
💃 for the code |
plotProps.fullValue = plotProps.fullValue.substring(1); | ||
plotProps.min = 1; | ||
plotProps.max = 12; | ||
plotProps.units = parseInt(plotProps.fullValue, 10) === 1 ? _('Month') : _('Months'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does plotly.js accept any other format than M for months? D for days? seconds? I'd be surprised if it was only months :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well actually, from the docs, it does look that months is the only option:
https://plot.ly/javascript/reference/#layout-yaxis-dtick
If the axis `type` is "date", then you must convert the time to milliseconds. For example, to set the interval between ticks to one day, set `dtick` to 86400000.0. "date" also has special values "M<n>" gives ticks spaced by a number of months. `n` must be a positive integer. To set ticks on the 15th of every third month, set `tick0` to "2000-01-15" and `dtick` to "M3". To set ticks every 4 years, set `dtick` to "M48"
Either that or time in milliseconds, so I could add a richer widgets that allows to do either milliseconds or months
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Call me "surprised" :)
Should we actually bake |
part of #803
Adjusts AxesRange and allows to detect when fullValue is date so that proper control showsbefore

after
