plotly.py
plotly.py copied to clipboard
How to override box chart hover template, trace name is repeating in each property on hover.
import plotly.graph_objects as go
from plotly.data import iris
# Load the dataset
df = iris()
fig = go.Figure()
fig.add_box(x =df['sepal_length'],name='sepal_length')
fig.add_box(x =df['sepal_width'],name='sepal_width')
fig.add_box(x=df['petal_length'],name='petal_length')
fig.add_box(x=df['petal_width'],name='petal_width')
fig.update_layout(template ='gridon')
fig.show()

How to Remove the Trace name i.e. "petal width", from hover of each property of box plot? having legend intact.