plotly.graph_objects.Sankey docs incorrectly indicates support for legends
未关闭
@LiamConnors 已经在做这个了。
开始于 2024年7月8日。
documentation
P3
- 主要语言
- Python
- 星标
- 18.8k
- 派生
- 2.8k
- 平均合并
- 16 小时 26 分钟
- 30 天内合并 PR
- 21
描述
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 for plotly.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:
import plotly.graph_objects as go
go.Figure({
'data': [
{'link': {'source': [0, 0, 0, 1, 1, 1, 2, 2],
'target': [3, 4, 5, 3, 4, 5, 3, 5],
'value': [10, 20, 20, 10, 5, 5, 20, 10]},
'name': 'Trace 1',
'node': {'label': ["A", "B", "C", "D", "E", "F"]},
'type': 'sankey'
},
],
'layout': {'showlegend': True}
})
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.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
评估
这个 Issue 还没有评估数据。