2

I have created a stacked bar chart with Plotly for my Dash App, but I want to assign a different "color-scale" to each bar. There's 14 bars in total with subgroups of up till 14. The bar is depending on a range slider (years); it can show data from multiple years or one year only. When I choose one year, the code works fine and the bars are colored differently, but when more years are selected, it doesn't work as all bars gets the same color as defined for the first bar only.

I want something like this (three bars shown only): https://i.stack.imgur.com/G4g8X.png

But gets something like this when a time span is selected: https://i.stack.imgur.com/376BS.png

Do anyone know how to fix it? :)

Camilla
  • 21
  • 2

0 Answers0