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

Merged
merged 9 commits into from
Nov 19, 2024

Conversation

sophiamersmann
Copy link
Member

@sophiamersmann sophiamersmann commented Nov 8, 2024

Relates to #4017 | Designs

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

sophiamersmann commented Nov 8, 2024

@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): 1262 (9379a2) ❌
Number of differences (all views): 312 (c31692) ❌

Edited: 2024-11-18 17:16:13 UTC
Execution time: 1.29 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

@sophiamersmann sophiamersmann force-pushed the refactor-annotation-viz branch from 1a672b3 to 5b0cb32 Compare November 11, 2024 09:17
Base automatically changed from refactor-annotation-viz to master November 11, 2024 11:54
@sophiamersmann sophiamersmann marked this pull request as ready for review November 19, 2024 06:55
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.

nice!

@sophiamersmann sophiamersmann merged commit 8d5104d into master Nov 19, 2024
24 checks passed
@sophiamersmann sophiamersmann deleted the stacked-area-hover-viz branch November 19, 2024 15:25
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