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

WIP: Simplify Tooltips #1799

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

envex
Copy link
Collaborator

@envex envex commented Feb 4, 2025

What does this implement/fix?

See if we can move away from positioning the tooltip based a bunch of math around the data and SVG points.

I think we should be able to use data attributes to get all the data we need to render and position the tooltips. We already have it available when we render the chart elements, why not just use that and skip all the getXPosition and getAlteredX functions we have for each chart.

This should make adding tooltips to new charts way easier.

Does this close any currently open issues?

What do the changes look like?

Storybook link

Before merging

  • Check your changes on a variety of browsers and devices.

  • Update the Changelog's Unreleased section with your changes.

  • Update relevant documentation, tests, and Storybook.

  • Make sure you're exporting any new shared Components, Types and Utilities from the top level index file of the package

@envex envex force-pushed the envex/better-tooltip-positioning branch 4 times, most recently from da1eac7 to 76fa457 Compare February 5, 2025 18:52
@envex envex force-pushed the envex/better-tooltip-positioning branch from 76fa457 to 470a485 Compare February 5, 2025 19:10
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.

1 participant