Answers for "plotly hide trace from hover"

0

plotly hide trace from hover

# add <extra></extra> into hovertemplate
# e.g. show both value and percentage in hover info without trace name
fig = go.Figure()
fig.add_trace(
    go.Bar(
        x=df["steps"],
        y=df["reads_percentage"],
        name="bar",
        customdata=df["reads"],
        hovertemplate="%{y:.2f}%<br>%{customdata:.0f} reads <extra></extra>",
    )
)
Posted by: Guest on March-24-2022

Python Answers by Framework

Browse Popular Code Answers by Language