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

Improve default tooltip placement in Semiotic charts #62

Open
macfarlandian opened this issue Oct 4, 2021 · 0 comments
Open

Improve default tooltip placement in Semiotic charts #62

macfarlandian opened this issue Oct 4, 2021 · 0 comments

Comments

@macfarlandian
Copy link
Contributor

What needs to be done? Why does it need to be done?
In most cases we want the following default tooltip behavior in a chart:

  • consistent width even when close to the edge
  • kept within the boundaries of the chart when possible
  • flip placement to left/right and top/bottom when close to the edge

There have been two implementations of this in the wild so far, in Spotlight and the Admin panel, both of them somewhat specific to the specifics of the chart. It should be possible to create a more generic implementation of this approach that works for other frame and chart types. (Probably it will require consumers to pass in the chart dimensions, because the tooltip data does not contain this.)

Additional context
some related issues in Spotlight here ... it could adopt more design system features if they resolved this

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

No branches or pull requests

1 participant