plotly.graph_objects.Sankey docs incorrectly indicates support for legends
Đang mở
@LiamConnors đang làm issue này rồi.
Từ ngày 8/7/2024.
documentation
P3
- Ngôn ngữ chính
- Python
- Star
- 18.8k
- Fork
- 2.8k
- Merge trung bình
- 16 giờ 26 phút
- Pull request đã merge (30 ngày)
- 21
Mô tả
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.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Đánh giá
Issue này chưa được đánh giá.