plotly / plotly/plotly.js

Hover box overlapping point/cursor

Offen
#5,097 4 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

bug P3
Vorherrschende Sprache
JavaScript
Sterne
18.3k
Forks
2k
Ø Merge
2 T. 12 Std.
Gemergte PRs (30 T.)
28

Beschreibung

With plotly express, when using hover_data, the hover box sometimes covers the point for which it is shown (depending on the size of the hover box). It would be good if this could get avoided by shifting the box. In many cases, it is clear before showing the plot, in which direction the hoever box could get shifted to better avoid this, so even if the javascript cannot figure this out automatically it would be good to allow something like "hover_box_delta_x", "hover_box_delta_y" to shift the box that many pixels to the right (if negative, to the left), for example.

When the box completely covers the cursor and the point it is shown for it is very hard to put the information in context and even harder to show the information for another point, because neighbouring points are not visible at all.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, die für plotly express und hover_data verwendete JavaScript-Hover-Behandlung nachzuverfolgen, wobei du dich darauf konzentrierst, wie die Hover-Box relativ zu ihrem Punkt und zum Cursor positioniert wird. Als erledigt gilt die Aufgabe, wenn die Box den ausgewählten Punkt nach Möglichkeit nicht verdeckt und die vorgeschlagenen horizontalen und vertikalen Pixel-Offsets unterstützt, wenn die automatische Positionierung keine bessere Richtung bestimmen kann.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript
Bereich
data-visualization
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.