Black Lives Matter. Please consider donating to Black Girls Code today.

Remove 'trace 0' next to hover

Hi, in the hover documentation it shows how to customize a tooltip with a hover template.

The thing I am trying to figure out is why the top line (purple) has ‘trace 0’ in the hover, but the red line below does not. I would like to use a template, like the purple line, but don’t want the ‘trace 0’.

Appreciate your help!!

Hi @ssimontacchi welcome to the forum!

The <extra></extra> part of the example removes the trace name, since these tags are used to control what’s used in the second box, as explained in docstrings for hovertemplate, see for example