-
-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ (static charts) make charts mobile-friendly (#2977)
Collection of small improvements to make static charts more mobile-friendly. Some changes apply to static+mobile charts only, others apply to all charts (interactive and static). For all charts: - Font size changes - Rather than micro-managing font sizes for the special case of static+mobile charts, I rely on the `baseFontSize` to scale all font sizes up - To make that work, I have adjusted some font sizes to make sure it looks good for all cases (desktop/mobile, interactive/static) - I compiled a list of font sizes currently in use [here](https://www.notion.so/owid/d24b12ac2a754420af4aeba26ba21cca?v=647f5989b92d46e0bd802a52597ddcda&pvs=4); the table also denotes the changes I made - The biggest change I made is decreasing the font size of tick labels by a few pixels (0.9 -> 0.75, i.e. 14.4px -> 12px for `baseFontSize` = 16px) - Updated colours in the chart to use Grapher's dark and light colours - Updated the opacity used for bars and areas (0.8) - Draw a white outline around value labels that are rendered into the chart area and might overlap with grid lines (DiscreteBar and StackedDiscreteBar) - Make the detail's font size respect the base font size - Make entity labels in ScatterPlots respect the base font size For static+mobile charts only: - Increased the thickness of axis lines - Increased the thickness of lines in LineCharts and SlopeCharts - Increased the thickness of lines in Maps - Hide line markers in LineCharts - Changed the text colour of the subtitle, footer and axis labels - Remove underlines for links in the footer - If the footer text is long, decrease its font size - SlopeChart: Hide the vertical axes on the sides --- - Mobile optimizations are also applied to thumbnails generated for social media: - chart: [old](https://ourworldindata.org/grapher/thumbnail/life-expectancy?imType=og) / [new](http://staging-site-export-charts-for-mobile/grapher/thumbnail/life-expectancy?imType=og) - map: [old](https://ourworldindata.org/grapher/thumbnail/burden-of-disease-who?imType=og) / [new](http://staging-site-export-charts-for-mobile/grapher/thumbnail/burden-of-disease-who?imType=og)
- Loading branch information
Showing
27 changed files
with
455 additions
and
184 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.