issue with link in label
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 18.8k
- フォーク
- 2.8k
- 平均マージ
- 16時間 26分
- マージ済み PR(30日)
- 21
説明
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!
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Sankey ノードラベルのレンダリングと、issue に示されているエクスポート済みの HTML/SVG マークアップから始めます。ラベルのテキストが残る一方で href が削除される理由を調査し、その後、エクスポートされたノードラベルが通常のラベルレンダリングを変更せずに機能するリンクを保持することを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- data-visualization
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100