Skip to content

Histogram hover template doesn't recognise trace name #3864

@matt-barker94

Description

@matt-barker94

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3backlogbugsomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions