Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🎉 (slope) feature parity with line charts / TAS-708 #4192

Open
wants to merge 46 commits into
base: master
Choose a base branch
from

Conversation

sophiamersmann
Copy link
Member

@sophiamersmann sophiamersmann commented Nov 20, 2024

Adds line chart features to slope charts.

Designs are implemented in a later PR. For now, I removed all custom rendering logic and used the line chart's line legend for labelling. The details of the layout, the slope style, the entity and value labels will change in a future PR, so no need to review the rendering. This also includes rendering bugs like dots overflowing, misaligned labels, etc.

Summary

  • Plot the selected entities only
  • Added support for multiple y-dimensions (behaves like line charts, i.e. multiple entities and columns can be plotted at the same time)
  • Added support for specifying a missing data strategy
  • Added support for relative mode
  • Added support for "entity name attributions" (the explanations that sometimes appear next to a label in the line legend)
  • Added tooltips
  • Enabled timeline animation for slope charts
  • Switched to the labelling algorithm used by line charts
  • Dropped support for focusing lines (will be added back later in a different form)
  • Dropped support for a categorical colour dimension (could be a nice to have but not strictly necessary if only a small subset of entities are rendered at a time)
  • Migrated all existing slope charts (changes have been reviewed by Fiona)

Might be addressed later

  • Faceting! (would be nice but not strictly necessary, so will look into it maybe later)

Not addressed

  • Some line charts have a numerical colour dimension, but slope charts ignore the colour channel for now. It wouldn't be very useful in slope charts and we have so few line charts that use a colour channel that I don't feel it's worth the effort

Testing

I enabled slope tabs for all line charts on staging for testing.

Example charts:

Bugs

@owidbot
Copy link
Contributor

owidbot commented Nov 20, 2024

Quick links (staging server):

Site Dev Site Preview Admin Wizard Docs

Login: ssh owid@staging-site-redesign-slopes-viz

SVG tester:

Number of differences (default views): 26 (e6891d) ❌
Number of differences (all views): 22 (58220a) ❌

Edited: 2024-11-29 16:04:27 UTC
Execution time: 1.27 seconds

@sophiamersmann sophiamersmann changed the title ✨ (slope) redesign ✨ (slope) feature parity with line charts Nov 21, 2024
@sophiamersmann sophiamersmann force-pushed the grapher-refactor-types branch 2 times, most recently from d5cc21b to 0e247d5 Compare November 21, 2024 12:57
@sophiamersmann sophiamersmann changed the title ✨ (slope) feature parity with line charts 🎉 (slope) feature parity with line charts Nov 21, 2024
@sophiamersmann sophiamersmann changed the title 🎉 (slope) feature parity with line charts 🎉 (slope) feature parity with line charts / TAS-708 Nov 22, 2024
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants