Skip to content

Fix gl3d ticks when converting dates to milliseconds #4903

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

Merged
merged 2 commits into from
Jun 5, 2020

Conversation

archmoj
Copy link
Contributor

@archmoj archmoj commented Jun 5, 2020

Supersedes #3721 and fixes #4902.
Demo: Before vs After.

@plotly/plotly_js

@@ -90,7 +90,7 @@ module.exports = function setConvert(ax, fullLayout) {
* - inserts a dummy arg so calendar is the 3rd arg (see notes below).
* - defaults to ax.calendar
*/
function dt2ms(v, _, calendar, msUTC) {
function dt2ms(v, _, calendar, opts) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good call. At some point I bet we could collapse all these extra args into a single opts arg (ie dt2ms(v, opts)) but that's a big and potentially risky project - which some users may consider a breaking change though the ax.a2b functions are sufficiently "internal" that I personally wouldn't be bothered by it. Anyway not a change to make now.

Copy link
Collaborator

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💃 glad to see it was an easy extension after #4900 🎉

@archmoj archmoj merged commit 2d6cf3d into master Jun 5, 2020
@archmoj archmoj deleted the gl3d-ticks-fix-milliseconds branch June 5, 2020 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken regression this used to work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gl3d ticks are off by timezone
2 participants