Plot.ly Column Chart: Change display value of tool tip hover-over

1
Hi,  In the column chart I would like to show a value in millions in the tool tip on hover-over. On the Y axis, the values are automatically updated to millions. Is there an option to do this for the tool tip as well?  E.g.: 1.000.000 = 1M
asked
2 answers
3

Hi Sebastiaan,

If you use a custom hovertemplate then it's possible using d3 format.

More info:

https://plotly.com/javascript/reference/#scatter-hovertemplate

and

https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format

hovertemplate should be used inside the data-object, so put the json in the advanced tab of the series item.

f.e.:

{
"hovertemplate": "<b>%{x|%d %b}</b><br>%{fullData.name}: %{y} <extra></extra>"
}

GL!

 

answered
1

Hey Sebastiaan,

Not sure if you found a solution but maybe have a look at the ‘Tooltip form’ option under ‘Events’ for the chart widget (at least for Pie charts)

Here you can just add a custom page and show any values you want on hover. 

Let me know if that solves it?

answered