Open ned9 opened 4 years ago
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.
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. Just brief me about how to solve this. Can I work on it?
Ah right, well that explains things. Thanks for clearing that up. So the name
param does nothing for Sankey plots then?
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?
@LiamConnors is this still an issue?
The documentation update is still an issue. It's not an easy one to resolve as the the documentation is autogenerated from Plotly.js and probably requires some updates to Plotly.js.
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.