Customizing text on x unified hovering

So it appears that the question of removing or amending the “title” of a hover using unified hovermode has been asked multiple times without an answer on the plotly forum over the years:

And more than a few times on stackoverflow:

I am building a fairly complicated dashboard where this issue comes up in three separate places. I am inferring from the lack of a solution that this is just not currently possible. I am not super familiar with the plotly development process, but is there a way to request that this functionality be added?

I haven’t found anything in the documentation suggesting that the hovertemplate of a stacked x-unified bar chart can’t be customised in those ways, and something must be assembling it in that format, but what that may be doesn’t seem to be specified anywhere.

Completely undocumented, but while I was stepping through the plotly figure in dash I noticed that the default template takes the data passed in and create a hover template with <extra></extra> tagged onto the end of the hovertemplate. If you add <extra></extra> to the end of a traces hovertemplate it will not add the trace name into the ‘x unified’ hover allowing you to do the following:

 bar_graph_layout= "plotly express or plotly graph object"
 for x in
            x.hovertemplate = "{name}:<br>Sometag: %{x}<br>Some otherinfo: %{y}<extra></extra>".replace('{name}',

If <extra></extra> is not added the hovertemplate, the legend group or trace name will be applied around the hovertemplate in something you cannot edit, but if that html tag is in the hovertemplate it allows you the control the entire hover for each x unified group.

Not to necro an old thread, but I again ran into this problem and wanted to check in ( 6 months later) to see if anyone had any ideas. The above solution, of adding the “extra” tags, involve modifications to the the “trace names,” circled in red below, not the tooltip title, circled in blue below.


Ideally, I would be able to replace the blue circled text, which is the y-axis tick name, with a combination of some static text and the value from another datapoint in the set. E.g., replace “6th” with “Total Tested: 87.”

I know this seems minor, but as I mention in an earlier message, this issue actually pops up three times in this particular project of mine and I’d love to fix it if possible.

Also, if you use hoverinfo=“text” and hovertext=[array of texts], rather than hovertemplate, this will avoid showing the title