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

🐛 (sparkline) fix visual glitch #3095

Merged
merged 2 commits into from
Jan 16, 2024
Merged

Conversation

sophiamersmann
Copy link
Member

@sophiamersmann sophiamersmann commented Jan 12, 2024

Why this bug happened

  • Sparkline uses Grapher's LineChart to render
  • The horizontal min and max lines and their labels are defined outside of the LineChart
  • At some point, the LineChart added some more top and bottom padding to its bounds, but the sparkline chart wasn't updated accordingly

Solution

  • To make sure the code doesn't go out of sync again, the LineChart's axis object is used to figure out the position of the extra lines and labels that live outside of the line chart

Before / after

Screenshot 2024-01-12 at 18 27 02 Screenshot 2024-01-12 at 18 27 21

@sophiamersmann sophiamersmann force-pushed the fix-map-tooltip-sparkline branch from 174b320 to 38b7eae Compare January 15, 2024 07:46
@sophiamersmann sophiamersmann merged commit 7e20a70 into master Jan 16, 2024
15 checks passed
@sophiamersmann sophiamersmann deleted the fix-map-tooltip-sparkline branch January 16, 2024 09:35
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.

Tooltip: Maximum value of small chart is off by a few pixels
1 participant