Closed mattijn closed 1 month ago
Thanks for your review, I will open a new PR with another example based on your suggestion to have text overlay on the bars instead of the text above the bars. That also will highlight an issue that I hope becomes easier to write with your work on expressions (edit: done per https://github.com/vega/altair/pull/3614).
This PR adds an example that demonstrates how to create partially overlapping bars in a grouped bar chart.
The example looks as such:
The overlapping effect was created using the following code (method-based syntax):
Explanation:
width=alt.Step(12)
inalt.Chart()
defines the space allocated for each bar and thus defines the amount of overlap.mark_bar(size=20)
sets the actual width of the bars.paddingOuter=0.5
parameter in thexOffset
scale creates spacing between the categories along the x-axis, to make sure the groups are distinct