Dear Plotly Community,
I am struggling a little to color a treemap the way I would like it to be.
TLDR: I would like to color multiple levels in a treemap
Here is a sample of the data:
Office State Region Country Super Region All office 1 IL Midwest US Central all office 2 TX South US Central all
This goes for about 80 rows all with different regions, countries, and super regions.
Right now I have the Treemap coloring on Region with the color_discrete_map attribute:
px.treemap(hierarchy_df, path=[“All”,“Country”,“Super Region”,“Region”,“State”],
width = 1800, height = 800, color = “Region”,
I do like that because Region is the area I want to draw the viewer’s eye too.
I am wondering if I can do the same coloring I did to Region to another level in the data (Super Region).
I tried using the color attribute twice but it is saying it can’t be repeated.