I have created a 3 level treemap using plotly express using below code:
import plotly.express as px
fig = px.treemap(veh_3d_data, path=['Date', 'Capacity.2', 'Transporter'], values='Vehicle Plate',
color='Capacity.2',
#textinfo="label+value",
labels = {'Date':'Date', 'Capacity.2':'Capacity', 'Transporter':'Transporter', 'Vehicle
plate':'Vehicle Count' },
color_discrete_map={'(?)':'lightgray','18K':'tomato', '27K':'cadetblue',
'36K':'darksalmon', '50K':'mediumseagreen', '45k':'lightsteelblue'}
)
fig.data[0].textinfo = 'label+value'
fig.data[0].hoverinfo = 'skip'
pyo.plot(fig, filename='veh_avail_tree.html')
but i am getting the hover text for the outermost block of the tree also as shown in the image attached.
the data frame looks like this:
Date Capacity.2 Transporter Vehicle Plate
0 2020-01-06 18K T4307423 4
1 2020-01-06 18K T4308711 1
2 2020-01-06 18K T4308874 3
3 2020-01-06 27K T4300185 1
4 2020-01-06 27K T4300330 1
... ... ... ... ...
254 2020-01-18 36K T4311081 1
255 2020-01-18 36K T4311504 1
256 2020-01-18 50K T4306615 1
257 2020-01-18 50K T4311082 2
258 2020-01-18 50K T4311085 4
could you help me in removing the hovertext from the outer most block only?