Quantcast
Channel: 🎛️ Dash - Plotly Community Forum
Viewing all articles
Browse latest Browse all 6271

Treemap Hovertext

$
0
0

@saboo.anuj17 wrote:

Hello,

I am trying to create a treemap. The dataframe df_all_trees has some more columns which I would like to display as information on hovering. How do I add this data into a variable that can be then used in hovertemplate?

fig.add_trace(go.Treemap(
    labels=df_all_trees['id'],
    parents=df_all_trees['parent'],
    values=df_all_trees['value'],
    branchvalues='total',
    marker=dict(
        colors=df_all_trees['color'],
        colorscale='RdBu',
        cmid=average_score),
    hovertemplate='<b>%{label} </b> <br> Last Close: %{value}',
    name='' ), 1, 1)

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 6271

Trending Articles