-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Automatically color individual groupby child traces #1823
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Okay, going to try to PR this to vary colors for each expanded trace under the assertion that plotly.js should handle this differently. Second opinions welcome though, @alexcjohnson @etpinard. |
I understand this issue better after digging a bit. The problem is that On the first pass, the default color is applied. Is there any way to clear the color for the second pass? Or to cause the defaultColor to definitely be applied on the second pass in any general sort of way? |
Okay, thinking through this over and over, and I'm struggling. The necessary behaviors:
I still think this seems more like a plotly.js issue than a workspace issue, but of course the nuclear alternative is to shift the burden to the workspace and just construct styles manually. That will cause the |
done in #1830 |
@jackparmer points out that when you add a groupby, only the legend changes, which isn't particularly helpful. Is there some way to work it in so that child traces don't simply inherit the same color and need to be manually styled to be meaningful?
Otherwise this may be strictly a workspace issue, but it seems that if there's some way to accomplish this in plotly.js, that would be preferable.
It isn't entirely straightforward since they do inherit the parent styles, which is a single color. Perhaps this could be accomplished with groupby populating the
style
field with unique colors for each child trace. It's ugly to need to populate all the group style fields, but unless there's a better way to override the default color, then I'm not sure the best path.The text was updated successfully, but these errors were encountered: