Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#7,727 6 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@RichardNeill is already working on this.

Since Mar 11, 2026.

Assessment

This issue has not been assessed yet.

Description

feature

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 :-)

Dominant language
JavaScript
Stars
18.3k
Forks
2k
Avg merge
1d 21h
Merged PRs (30d)
21

Getting set up

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.

More from plotly/plotly.js

All issues in plotly/plotly.js

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.