Tight: how can I change the format of hover marks?

I looked through the online documentation, but couldn't find a way to change the format of the hover shortcuts:

screenshot

For example, if I want to display the number as "~ 611 thousand" or something like that.

+4
source share
2 answers

Floating tick and hover formatting is fully customizable using the python / d3 formatting language .

From the API, use the axis 'tickformat'and attributes 'hoverformat'to set the behavior. For example, this graph has 'layout.yaxis.hoverformat': ',f'.

From a web application, enter your formatting specifications under Axes → Shortcuts:

enter image description here

+5
source

Plotly String, .

, - jquery on_hover:

result.on('plotly_hover', function (eventdata){
  /*
   * var hoverTooltip = $(".hovertext", result)[0],
   *     hoverText = $("text", hoverTooltip).get(0),
   *     hoverFrame = $("path", hoverTooltip).get(0);
   *
   *  do what you want here
   *
   */
})

( )

+1

All Articles