plotly / plotly/plotly.js

[FEATURE]: Support setting hover text for legend and/or legend items

Offen
#7,727 6 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@RichardNeill arbeitet bereits daran.

Seit 11.3.2026.

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

Beschreibung

It would be nice to have a way to set a title for the legend, via legend.title
This would give us a way to set the mouse-over hover-tip.

Meanwhile, a way to do this is:

var legendTitle = document.createElementNS('http://www.w3.org/2000/svg', 'title');
legendTitle.textContent = 'Click to toggle this trace. \nDouble-click to toggle others.';
$(".legend .traces").append(legendTitle);

More generally, some "title" attributes would be helpful every time the cursor pointer changes.
The modebar does exactly what I want. I think we also need the same for rescaling/dragging axes,
and as above, for what happens when you click the legend.

Thanks :-)

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.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

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