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

Revisit if default timeUnitBandPosition should consistently 0 for all marks. #9127

Open
kanitw opened this issue Oct 6, 2023 · 0 comments · May be fixed by #9128
Open

Revisit if default timeUnitBandPosition should consistently 0 for all marks. #9127

kanitw opened this issue Oct 6, 2023 · 0 comments · May be fixed by #9128

Comments

@kanitw
Copy link
Member

kanitw commented Oct 6, 2023

Currently, timeUnitBandPosition = 0.5 by default for bar and rect, but timeUnitBandPosition = 0 for all other marks, mainly because we previously did not support other timeUnitBandPosition. However, this pending PR allows us to adjust bandPosition for bars, and center align bars with ticks.

There are two reasons we should consider doing this:

1. More readable time binned axes

With bandPosition = 0.5 (current default)

image

(Spec)

Readers need to know that the bar for year 2011 is on the right of the bars.

However, with bandPosition = 0, we don't have this confusion.

image

2. Better Alignment for combo chart by default

It's a bit weird that lines and bars do not align by default, like in this example:

image

Spec

We need to either (a) set bar's bandPosition = 0

image

or (b) line's bandPosition = 0.5

image

(If we set bar's bandPosition to be 0 then we don't have this issue.

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

Successfully merging a pull request may close this issue.

1 participant