plotly.py icon indicating copy to clipboard operation
plotly.py copied to clipboard

Histogram hover template doesn't recognise trace name

Open matt-barker94 opened this issue 3 years ago • 0 comments

Hi,

I have been customising the hover template of a histogram, but it doesn't seem to recognise the name keyword when added to the template. Plotly version 5.10.0

import plotly.graph_objects as go
x = [1, 2, 2, 1, 2, 2, 3]

fig = go.Figure()
fig = fig.add_histogram(name='example', x=x, hovertemplate='%{name}')
fig.show()

The result (with hover): image

What I should get: Same as above, but with %{name} replaced with example.

matt-barker94 avatar Aug 22 '22 10:08 matt-barker94