Skip to content

Improve default tooltip placement in Semiotic charts #62

@macfarlandian

Description

@macfarlandian

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions