Closed sophiamersmann closed 3 months ago
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-grapher-hyphen-breaks
Edited: 2024-06-10 11:38:13 UTC Execution time: 1.17 seconds
Thanks for the review! I updated the tests :)
Summary
Adds the ability to break after hyphens (
-
) toTextWrap
. This is then used for slope labels to reduce the space we need for the labels on both sides.I considered making this the default but decided against it because many labels looked worse / less balanced with additional line breaks after hyphens.
SVG tester
Some charts come back with a difference, but they're visually the same. The new code trims whitespace from each side:
Screenshots
Example chart: https://ourworldindata.org/grapher/maternal-mortality-slope-chart?country=High-income+countries~Lower-middle-income+countries