Same legend color for mutiple unique entry

  1. if you see below attached plot, s_ce0,s_dpu1,s_ce1 has same bar color i.e. blue and s_ce1 and s_ce0 has same color for scatter line i.e. orange

couldnt figure out why? can anybody help.

  1. how do i order my legned enteries, e.g. i want s_dpu0 and s_dpu1 at bottom of stack bar?

1 Like

Here are some legend item ordering options:

See Label color in legend · Issue #1701 · plotly/plotly.js · GitHub

@etienne for 1st problem, are you suggesting to use custome color instead of keeping plotly to add unique color for each entry?

To be honest, I’m not really sure what you’re hoping for here. I listed a few possible way to customize the legend style, I doubt it will be sufficiently for your needs, but it should help.

I am hoping to get more colors in legends, after bit digging in google and main src code found out plotly use d3.scale.category10 that means after 10 entries color will repeat, see below for easiest example.

i am hoping to increase this color scale to category20

1 Like