Indicator domain doesn't work in make_subplots()
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 45/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- jupyter-notebook, python
研究方向
先在 Jupyter Notebook 中執行提供的 Python 範例,並檢查 make_subplots() 如何為 go.Indicator traces 指派網域。將要求的列與欄位置與渲染結果進行比較,然後驗證 indicators 是否能如描述般垂直定位,以及該範例在四個 subplot 儲存格中的行為是否一致。
由索引模型根據 Issue 內容生成。
描述
There seems to be a bug with the Indicator class domain/position when used in make_subplots()
I am trying to vertically position 2 indicators in a subplot, so that I have one above the other, but is not working.
Example below is adapted from the indicator example on the plotly website
I also tried { 'type ' : 'domain' } as I read this this might be the issue
version plotly = 5.23
fig made in Jupyter Notebook
from plotly.subplots import make_subplots
import plotly.graph_objects as go
fig = make_subplots(
rows=2, cols=2,
specs=[ [{"type": "indicator"},{"type": "indicator"}] ,
[{"type": "indicator"}, {"type": "indicator"}],
]
,
)
fig.add_trace(go.Indicator(
mode = "number+delta",
value = 200,
domain = {'x': [0, 0.5], 'y': [0, 0.5]},
delta = {'reference': 400, 'relative': True, 'position' : "top"}),
col =1,
row = 1,
)
fig.add_trace(go.Indicator(
mode = "number+delta",
value = 350,
delta = {'reference': 400, 'relative': True},
domain = {'x': [0.5, 1], 'y': [0.5, 1]}),
col =1,
row = 1,
)
fig.add_trace(go.Indicator(
mode = "number+delta",
value = 450,
title = {"text": "Accounts<br><span style='font-size:0.8em;color:gray'>Subtitle</span><br><span style='font-size:0.8em;color:gray'>Subsubtitle</span>"},
delta = {'reference': 400, 'relative': True},
domain = {'x': [0.6, 1], 'y': [0, 1]}),
col =2,
row = 2,
)
fig.show()
- 主要語言
- Python
- 星號
- 18.8k
- 分支
- 2.8k
- 平均合併
- 13 小時 41 分鐘
- 30 天內合併 PR
- 21
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
plotly/plotly.py 的其他 Issue
-
P3 size: 1 task
難度 2/5 1-3 小時 新手友好度 65/100
-
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
相似的 Issue
-
essnmx good first issue
難度 1/5 1 小時以內 新手友好度 95/100
-
難度 2/5 1-3 小時 新手友好度 65/100
syfoud/Simulated_Scepter#174 ·
-
難度 2/5 1-3 小時 新手友好度 75/100
Giskard-AI/giskard-oss#2840 · 1 則留言 ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success 未關閉area: repo bug perceived difficulty: 2
難度 2/5 1-3 小時 新手友好度 70/100
-
難度 2/5 1-3 小時 新手友好度 75/100
yeti-platform/yeti#1380 ·