issue with link in label
Chưa có ai nhận issue này.
- 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ả
Hi all,
I am doing a sankey plot and I'd like each of my nodes to have a label that can be clickable and redirects to some link.
fig = go.Figure(
data=[
go.Sankey(
arrangement='fixed',
node=dict(label=labels, color=label_colors),
link=dict(
source=links["source"],
target=links["target"],
value=links["value"],
color=links["link_c"],
),
)
]
)
However, when exporting the plotly file to html, the link tag appears but the href doesnt, but when further inspecting it appears in "data-unformatted" part of the code below:
<text class="node-label" style="cursor: default; font-family: Helvetica; font-size: 12px; fill: rgb(42, 63, 95); fill-opacity: 1; white-space: pre; pointer-events: all; text-shadow: white 1px 1px 1px, white -1px -1px 1px, white 1px -1px 1px, white -1px 1px 1px;" data-notex="1" data-unformatted="<a href='google.com'>test</a>" data-math="N" x="0" y="0" text-anchor="start" transform="translate(23.25,4.449999999999999)"><a style="cursor:pointer">test</a></text>
Is there any way I can get this to work (I'd want <a href='google.com'>test</a> instead of the <a style="cursor:pointer">test</a>)
Thanks!
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.
Hướng nghiên cứu
Bắt đầu từ việc kết xuất nhãn nút Sankey và markup HTML/SVG đã xuất được hiển thị trong issue. Điều tra lý do href bị xóa trong khi văn bản nhãn vẫn còn, sau đó xác minh rằng các nhãn nút đã xuất vẫn giữ được các liên kết hoạt động mà không thay đổi việc kết xuất nhãn thông thường.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- data-visualization
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100