Open sophiamersmann opened 1 week ago
[!WARNING] This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite. Learn more
This stack of pull requests is managed by Graphite. Learn more about stacking.
Join @sophiamersmann and the rest of your teammates on Graphite
Quick links (staging server): Site | Admin | Wizard |
---|
Login: ssh owid@staging-site-stacked-bar-dual-axis
Edited: 2024-06-24 08:02:47 UTC Execution time: 1.17 seconds
Aligns x-axes of faceted StackedBar charts, resolves #2160
Implemented as part of an effort to create a set of climate charts, see draft charts on this staging site
Summary
DualAxisComponent
domainValues
to the axis – it's then the axis' job (i) to figure out how much space is available for a single domain value (called thebandWidth
) and (ii) to adjust the scale in such a way that we have sufficient padding on both sides for the outer bars to fitdomainValues
and theticks
are shared across all facets, so that we end up with the same x-axis for all facetsScreenshots
Link: http://staging-site-stacked-bar-dual-axis/grapher/natural-disasters-by-type?facet=entity&uniformYAxis=0&country=Wildfire~Glacial+lake+outburst+flood~Dry+mass+movement~Extreme+temperature