简体   繁体   中英

Hide Plotly Dash Sunburst Hover label

I am unable to hide the label, division and parent from hover tooltips

path=[pune,division,taluka,village]
value = df['Project Count'].tolist()
fig_sunburst = px.sunburst(df, path=path, values=value,
                                    color='Division',title="Taluka Wise Project Count")
fig_sunburst.update_traces(hoverinfo = 'ids+value')

df is a dataframe with the column ['Pune','division','taluka','village','Project Count']

在此处输入图像描述

When I hover over Khed taluka I get the tooltip as shown above. I want the id to be displayed first then the value. Rest all should be hidden. Also how can I rename value to 'Project Count'

Below you find an example from the plotly website. It should work the same for sunbursts

散点示例

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM