Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

Setting plot colors by legend?

Is there a method to set plot colors by the legend (alphabetically) instead of the colors being determined by the values?

Im using plotly offline for python and im unable to find a method (unless I manually define every traces color). I’m building dashboards offline and its not intuitive to look at several pie/bar/scatter plots with identical items in the legend but each legend assigns a different color.

Any recommendations?

Any solution for this ? I am using bar chart from plotly and need to specify colors for specific legends.
I have posted also here: