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

🔨 (line legend) refactor label dropping algorithm #4310

Merged
merged 2 commits into from
Dec 19, 2024

Conversation

sophiamersmann
Copy link
Member

@sophiamersmann sophiamersmann commented Dec 16, 2024

Refactors the code that is responsible for dropping labels if there is not enough space.

The SVG tester comes back with one additional difference. It's a slope charts where the 'Tanzania' and 'Mali' labels are swapped. Tanzania should be on top (its value is 1339) and 'Mali' should be below (its value is 1337), so the updated chart is correct.

@owidbot
Copy link
Contributor

owidbot commented Dec 16, 2024

Quick links (staging server):

Site Dev Site Preview Admin Wizard Docs

Login: ssh owid@staging-site-line-legend-refactor-viz

SVG tester:

Number of differences (default views): 2 (f9fd29) ❌
Number of differences (all views): 1 (04ac38) ❌

Edited: 2024-12-19 10:41:05 UTC
Execution time: 1.33 seconds

@sophiamersmann sophiamersmann force-pushed the line-legend-refactor-viz branch from a5caed0 to 770d172 Compare December 17, 2024 10:31
@sophiamersmann sophiamersmann force-pushed the line-legend-refactor-viz branch from 770d172 to 1599e40 Compare December 17, 2024 15:34
@sophiamersmann sophiamersmann force-pushed the line-legend-refactor-viz branch from 1599e40 to 7f96dff Compare December 17, 2024 15:57
@sophiamersmann sophiamersmann force-pushed the line-legend-tests-viz branch 2 times, most recently from 91ab2bd to 7b66a4d Compare December 17, 2024 16:34
@sophiamersmann sophiamersmann force-pushed the line-legend-refactor-viz branch from 7f96dff to b1fb797 Compare December 17, 2024 16:34
@sophiamersmann sophiamersmann force-pushed the line-legend-refactor-viz branch 2 times, most recently from 06d9453 to 3bbb970 Compare December 18, 2024 10:19
@sophiamersmann sophiamersmann marked this pull request as ready for review December 18, 2024 10:19
Copy link
Member

@marcelgerber marcelgerber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful work!

Copy link
Member Author

sophiamersmann commented Dec 19, 2024

Merge activity

  • Dec 19, 7:11 AM EST: A user started a stack merge that includes this pull request via Graphite.
  • Dec 19, 7:14 AM EST: Graphite rebased this pull request as part of a merge.
  • Dec 19, 7:15 AM EST: A user merged this pull request with Graphite.

@sophiamersmann sophiamersmann changed the base branch from line-legend-tests-viz to graphite-base/4310 December 19, 2024 12:12
@sophiamersmann sophiamersmann changed the base branch from graphite-base/4310 to master December 19, 2024 12:12
@sophiamersmann sophiamersmann force-pushed the line-legend-refactor-viz branch from 8896fae to 4d76221 Compare December 19, 2024 12:13
@sophiamersmann sophiamersmann merged commit c906407 into master Dec 19, 2024
13 of 15 checks passed
@sophiamersmann sophiamersmann deleted the line-legend-refactor-viz branch December 19, 2024 12:15
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.

3 participants