plotly / plotly/dash

Tooltip direction auto

Open
#2,358 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature P3
Dominant language
Python
Stars
24.4k
Forks
2.3k
Avg merge
2d 7h
Merged PRs (30d)
13

Description

Is your feature request related to a problem? Please describe.
With the current tooltip, direction information is difficult to define in the code during the hover data event.

Describe the solution you'd like
Keep the tooltip automatically in the visible region depending on the view zone.

Describe alternatives you've considered and additional context

direction = "bottom" if y > 1.5 else "top"

https://dash.plotly.com/dash-core-components/tooltip
image
As you can observe 1.5 threshold is not good in all the contexts.

Examples of similar requests:
https://community.plotly.com/t/how-to-position-custom-tooltip-within-visible-window/58819
https://stackoverflow.com/questions/72715452/plotly-dash-how-to-align-the-tooltip-to-the-top-instead-of-top-right/72717007

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the Dash tooltip documentation and the linked community examples to understand the existing direction options and positioning behavior. No repository files, tests, or entry points are identified in the issue; done means the tooltip stays within the visible region across view zones without requiring a fixed threshold.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.