This branch introduces a tooltip feature that can be activated by a new modebar button. It allows to add an annotation to every clicked point. By default, tooltips contain x and y coordinates. They can be customized to contain any additional data attached to the trace or points, which makes it a powerful tool for data exploration and presentation.
When a plot is created with editable: true
, the tooltips can be dragged around or deleted interactively. Their text can also be edited.
To delete a tooltip, click on its text and delete it.
Tooltips can be customized with an optional tooltiptemplate
(possibilities equivalent to hovertemplate) and tooltip
annotation options (possibilities equivalent to annotations)
This update is compatible with Dash when a figure is created with a Dictionary passed to dcc.Graph (see example in demo folder), but not yet with Plotly.py (its implementation enforces a limited set of properties).
Code and documentation copyright 2021 Plotly, Inc.
Code released under the MIT license.
This project is maintained under the Semantic Versioning guidelines.
See the Releases section of our GitHub project for changelogs for each release version of plotly.js.
- Follow @plotlygraphs on Twitter for the latest Plotly news.
- Implementation help may be found on community.plot.com (tagged
plotly-js
) or on Stack Overflow (taggedplotly
). - Developers should use the keyword
plotly
on packages which modify or add to the functionality of plotly.js when distributing through npm.