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

✨ (stacked area) improve hover states / TAS-687 #4129

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

sophiamersmann
Copy link
Member

@sophiamersmann sophiamersmann commented Nov 8, 2024

Stacked area charts are in a hover state when…

  • the chart area itself is hovered
  • an entity label on the right is hovered
  • the legend on top is hovered (only visible when faceted)

This PR cleans up the code around that and ensures that the hover state of a stacked area chart looks consistent, regardless of how it has been triggered.

In general, we want to move to a world where hovering highlights the hovered elements while muting all other elements by reducing their opacity (as opposed to greying them out).

This PR focuses on the stacked area chart, but the hover state of the line chart has also been updated to match the behaviour of the line legend.

Examples:

Before After
Screenshot 2024-11-08 at 17 51 57 Screenshot 2024-11-08 at 17 59 53
Screenshot 2024-11-08 at 17 53 10 Screenshot 2024-11-08 at 17 52 47
Screenshot 2024-11-08 at 17 54 29 Screenshot 2024-11-08 at 17 54 09

Copy link
Member Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

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
Copy link
Contributor

owidbot commented Nov 8, 2024

Quick links (staging server):

Site Admin Wizard Docs

Login: ssh owid@staging-site-stacked-area-hover-viz

SVG tester:

Number of differences (default views): 1346 (851c10) ❌
Number of differences (all views): 450 (ecbb2c) ❌

Edited: 2024-11-11 09:34:26 UTC
Execution time: 1.20 seconds

@sophiamersmann sophiamersmann changed the title ✨ (stacked area) improve hover & focus states ✨ (stacked area) improve hover states Nov 11, 2024
@sophiamersmann sophiamersmann changed the title ✨ (stacked area) improve hover states ✨ (stacked area) improve hover states / TAS-687 Nov 11, 2024
Copy link

Base automatically changed from refactor-annotation-viz to master November 11, 2024 11:54
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