I need to show 2 treemaps on the same screen, representing 2 different data sets.
(Actually, they’re the same data - one treemap represents positive values and one represents the absolute value of the negatives)
On both charts, I’m using a column called “flow” for the weight and color:
figPositive = px.treemap(dfTreeMap_Pos,
path=hierarchyColumns, values=‘revenue’,
color_continuous_scale=‘RdBu’,
color=‘flow’, hover_data=[‘revenue’, ‘flow’, ‘price’],
color_continuous_midpoint=np.average(dfTreeMap_Pos[‘flow’], weights=dfTreeMap_Pos[‘flow’]))
But since the range of the values differs between the two data sets, one will range from, say, 1-16, and the other from, say, 1-9
Is there a way to use the same reference scale on both charts?
Thanks~