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

Order of layering affect bar bandwidth #8590

Open
joelostblom opened this issue Dec 6, 2022 · 0 comments
Open

Order of layering affect bar bandwidth #8590

joelostblom opened this issue Dec 6, 2022 · 0 comments
Labels

Comments

@joelostblom
Copy link
Contributor

I want to use multiple aggregated tooltips with a box plot, but #7918 is preventing me from using the boxplot mark for this so I am building the chart from scratch. I noticed that the order of layering objects changes the bar bandwidth in an unfortunate way. If I put the line under the bar (as desired), there are not spaces between the bars:

Open the Chart in the Vega Editor

image

If the line goes on top, the spaces are there as intended:

Open the Chart in the Vega Editor

image

It feels like a bug to me that this is changed depending on the order of the charts in the layering. Looking at the vega spec, we can see that the first chart has "update": "bandspace(domain('x').length, 0, 0) * x_step"} and the second one has "update": "bandspace(domain('x').length, 0.1, 0.05) * x_step". A workaround is to set "mark": {"type": "bar", "width": {"band": 0.8}},

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

No branches or pull requests

1 participant