Jon
Jon

Reputation: 453

How do I format a number and increase the decimal point to the left with Plotly?

My data has positive integers like 10, 20, 30, etc, but I would like the hoverformat to display them in percentages like 10%, 20%, 30%, etc. I tried just adding "%" to hoverformat, but it just adds two extra zeroes to everything.

Upvotes: 1

Views: 104

Answers (1)

Nina Scholz
Nina Scholz

Reputation: 386746

You could set hoverinfo to something like

hoverinfo: 'label+percent+name'

for a display with %.

Upvotes: 1

Related Questions