Plotly.js: Deprecated `text` / use `hovertext` for traces that don't support on-graph text

Created on 18 Jan 2019  路  2Comments  路  Source: plotly/plotly.js

Attribute hovertext got added (first in https://github.com/plotly/plotly.js/pull/1523) for traces that support on-graph text. There are all the scatter* traces, pie and bar. Traces that support hover but do not support on-graph text currently use text to set the "hover" text. As @nicolaskruchten points out, this is a little confusing.

So, should we deprecate text (while renaming hovetext) in traces that do not support on-graph text?

feature

Most helpful comment

We could start by just adding hovertext in the relevant places... that increases consistency and breaks nothing :)

All 2 comments

We could start by just adding hovertext in the relevant places... that increases consistency and breaks nothing :)

Agreed that the end state should be no text attributes that only ever appear on hover. But we should look at the traces that currently have no on-graph text and figure out which ones we can imagine adding it to in the future, before actually removing the text attribute (in a major bump).

But yes, step 1 can be adding hovertext everywhere it's relevant.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jonmmease picture jonmmease  路  3Comments

HunterMcGushion picture HunterMcGushion  路  3Comments

n-riesco picture n-riesco  路  3Comments

nicolaskruchten picture nicolaskruchten  路  3Comments

bryaan picture bryaan  路  3Comments