-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
plotly.graph_objects.Sankey docs incorrectly indicates support for legends #2517
Comments
Unfortunately I think the legend doc entry is a little misleading in this case. It refers to what this attribute does for traces in general, when they support legends, but actually Sankey traces don't support legends at all. Sorry about the confusing docs, I'll see what we can do to fix them. |
I can help to fix it. It looks like an easy issue to fix unless you think it is more complex than changing the explanation provided in the docs for "name", This can be a good first issue for me to solve. |
Ah right, well that explains things. Thanks for clearing that up. So the |
It doesn’t really do much, no. It’s a parameter that’s available for all traces for consistency but absent a legend it’s only visible in hoverlabels, and in the case of Sankey traces, by default it’s not even shown there. |
@ineelshah thanks for the enthusiasm! This particular issue is a bit tricky to resolve, as the Python code and documentation in question is auto-generated from the Javascript code in https://github.com/plotly/plotly.js |
Is this issue still unresolved? There are ways to bypass the problem when building a Dash app, but for standalone Plotly Sankey charts, this looks like a brutal show stopper. |
Any updates? |
I'm trying to display a legend with a Sankey diagram. I gather this is intended to be possible as the docs state this for the
name
param forplotly.graph_objects.Sankey
: Sets the trace name. The trace name appear as the legend item and on hover.I can't see the legend appearing however, nor the trace name appearing on hover. The following example demonstrates the issue for me:
I'm using Plotly 4.8.1.
I also came across this Stack Overflow question that makes me wonder if this person is experiencing the same issue as me.
The text was updated successfully, but these errors were encountered: