Skip to content
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

missing grid lines and tick labels with range breaks at daily level #4686

Closed
nicolaskruchten opened this issue Mar 25, 2020 · 4 comments · Fixed by #4688
Closed

missing grid lines and tick labels with range breaks at daily level #4686

nicolaskruchten opened this issue Mar 25, 2020 · 4 comments · Fixed by #4688
Assignees
Labels
bug something broken
Milestone

Comments

@nicolaskruchten
Copy link
Contributor

See https://codepen.io/nicolaskruchten/pen/bGdxaVp

@nicolaskruchten nicolaskruchten added the bug something broken label Mar 25, 2020
@archmoj
Copy link
Contributor

archmoj commented Mar 25, 2020

@nicolaskruchten would you please set width and height in the codepen i.e. to ensure we are looking at identical graphs.
Thanks!

@nicolaskruchten
Copy link
Contributor Author

Done, although this is something you could have done by forking the pen :)

@archmoj
Copy link
Contributor

archmoj commented Mar 25, 2020

@nicolaskruchten thank you!!

@alexcjohnson I am not 100% sure if missing those lines is a bug.
But we could try improving that for sure.

On another note - it looks there is a wrong label displayed at that scale for Nov 15 which should be Nov 16 maybe?

@alexcjohnson
Copy link
Collaborator

The issue is with our automatic dtick algorithm, which in certain conditions can return either 2 days or 3 days, in addition to 1 day, 1 week, and other values.

var roundDays = [1, 2, 3, 7, 14];

ax.dtick = roundDTick(roughDTick, ONEDAY, roundDays);

When you remove weekends with rangebreaks, 2 or 3 day ticks look bizarre.

Suggestion: if we have day of week breaks, run that algorithm but if the result was 2 days reduce it to 1 day, and if the result was 3 days increase it to 1 week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants