textfont color ignored in Sankey diagram
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 35/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- python
研究方向
使用 Plotly 4.9.0 重現所提供的雙圖 Sankey MWE,並將正常運作的文字大小與被忽略的文字顏色進行比較。追蹤 Sankey textfont 的處理,然後新增 coverage,顯示所要求的顏色會被渲染;該 issue 沒有指定可作為起點的原始檔案或測試。
由索引模型根據 Issue 內容生成。
描述
When specifying textfont in a Sankey diagram like this: textfont=dict(color="blue", size=50) the color is ignored, while size works correctly.
A MWE with two figures. The first one has black nodes and (tiny) text, which is correct.
fig_black = go.Figure(data=[
go.Sankey(
node=dict(
pad=15,
thickness=20,
line=dict(color="black", width=0.5),
label=["A1", "A2", "B1", "B2", "C1", "C2"],
color="black"
),
link=dict(
source=[0, 1, 0, 2, 3, 3], # indices correspond to labels, eg A1, A2, A2, B1, ...
target=[2, 3, 3, 4, 4, 5],
value=[8, 4, 2, 8, 4, 2]
),
textfont=dict(color="black", size=10)
),
])
fig_black.update_layout(title_text="Black")
fig_black.show()
The second one has blue nodes, which is correct, but the text is black when it should be blue.
fig_blue = go.Figure(data=[
go.Sankey(
node=dict(
pad=15,
thickness=20,
line=dict(color="blue", width=0.5),
label=["A1", "A2", "B1", "B2", "C1", "C2"],
color="blue"
),
link=dict(
source=[0, 1, 0, 2, 3, 3], # indices correspond to labels, eg A1, A2, A2, B1, ...
target=[2, 3, 3, 4, 4, 5],
value=[8, 4, 2, 8, 4, 2]
),
textfont=dict(color="blue", size=50)
),
])
fig_blue.update_layout(title_text="Blue")
fig_blue.show()
I'm using plotly version 4.9.0.
Is the color specification above wrong or is this a bug?
- 主要語言
- Python
- 星號
- 18.8k
- 分支
- 2.8k
- 平均合併
- 16 小時 26 分鐘
- 30 天內合併 PR
- 21
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
plotly/plotly.py 的其他 Issue
-
P3 size: 1 task
難度 2/5 1-3 小時 新手友好度 72/100
-
bug P1
難度 1/5 1 小時以內 新手友好度 68/100
-
feature P3
難度 2/5 1-3 小時 新手友好度 62/100
-
feature P3
難度 2/5 1-3 小時 新手友好度 72/100
-
難度 3/5 1-2 天 新手友好度 35/100
相似的 Issue
-
bug
難度 2/5 1-3 小時 新手友好度 86/100
zostera/django-bootstrap4#894 ·
-
難度 2/5 1-3 小時 新手友好度 78/100
use-agent-os/agent-os#3276 ·
-
難度 2/5 1-3 小時 新手友好度 88/100
zephyrproject-rtos/zephyr#119726 ·
-
area/auth bug comp/agent P3 platform/discord type/security
難度 2/5 1-3 小時 新手友好度 88/100
NousResearch/hermes-agent#117848 ·
-
難度 2/5 1-3 小時 新手友好度 82/100
zilliztech/memsearch#759 ·