Home > front end >  R plotly: Customize Hover (Info and Text)
R plotly: Customize Hover (Info and Text)

Time:02-08

I would like to customize what I see in plotly when I hover on a bar.

Please have a look at the reprex at the end of the post. I had a look at

result

From the docs:

text:

Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace hoverinfo contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels.

hovertext:

Sets hover text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. To be seen, trace hoverinfo must contain a "text" flag.

  •  Tags:  
  • Related