owid / owid-grapher

A platform for creating interactive data visualizations
https://ourworldindata.org
MIT License
1.35k stars 227 forks source link

✨ (stacked bar) move legend to the top on mobile #3629

Closed sophiamersmann closed 3 weeks ago

sophiamersmann commented 1 month ago

Moves the legend of stacked bar charts to the top on mobile.

(SVG differences come from the previous PR)

Screenshot 2024-05-22 at 15 01 24 Screenshot 2024-05-22 at 15 02 04

If there is very little space (due to long text), then moving the legend to the top eats into the vertical space badly:

Before (375px) After (375px)
Screenshot 2024-06-04 at 23 09 20 Screenshot 2024-06-04 at 23 08 21
Before (325px) After (325px)
Screenshot 2024-06-04 at 22 58 39 Screenshot 2024-06-04 at 22 58 13

(Note that the legend overflows in the before version)

sophiamersmann commented 1 month ago

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @sophiamersmann and the rest of your teammates on Graphite Graphite

owidbot commented 1 month ago
Quick links (staging server): Site Admin Wizard

Login: ssh owid@staging-site-discrete-bar-mobile-legend

SVG tester: Number of differences (default views): 19 ([a90d8f](https://github.com/owid/owid-grapher-svgs/commit/a90d8fa7fe63af4cd5365fb22e9f09d98620bcae)) ❌ Number of differences (all views): 100 ([c7314e](https://github.com/owid/owid-grapher-svgs/commit/c7314e9009c23b24af4d05afc88e3181416b73d1)) ❌

Edited: 2024-06-10 11:25:39 UTC Execution time: 1.19 seconds

sophiamersmann commented 3 weeks ago

Merge activity