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

Multilayer Time axis shows confusing time ticks at start of axis #2536

Open
nickofthyme opened this issue Oct 2, 2024 · 0 comments
Open
Labels
:axis Axis related issue :xy Bar/Line/Area chart related

Comments

@nickofthyme
Copy link
Collaborator

nickofthyme commented Oct 2, 2024

The Problem

In some cases on a multi-layer time axis where the smallest time granularity is a unit of time, the starting tick shows as the previous nearest bucket. Take the example below, the first bucket is for the interval at 02:00 but the axis value shows 00:00 instead.

Image

This is because the leftmost tick represents the start of the first bucket. This works fine for time granularities like months or years that define an implicit broad range and not a precise time/start like hour of the day. You can see this in the demo below where October label moves to represent the full month until it is beyond that month, same for the 2020 year label.

Zight Recording 2024-07-31 at 09 49 44 AM

The Solution

I think the best solution in this case is to identify which granularities lead to this same confusion. Then for any of these granularities we disable the sticky placement behavior where we only these ticks at their exact accurate placement on the scale.

A more involved solution would be applied later to keep this behavior but show an arrow to indicate the tick is a reference to an off-screen value as described in #1934 (comment).

@nickofthyme nickofthyme added :axis Axis related issue :xy Bar/Line/Area chart related labels Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:axis Axis related issue :xy Bar/Line/Area chart related
Projects
None yet
Development

No branches or pull requests

1 participant