Indicator domain doesn't work in make_subplots()
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- jupyter-notebook, python
- Domain
- data-visualization
Research direction
Start by running the supplied Python example in a Jupyter Notebook and inspect how make_subplots() assigns domains to the go.Indicator traces. Compare the requested row and column positions with the rendered result, then verify that indicators can be vertically positioned as described and that the example behaves consistently across the four subplot cells.
Written by the indexing model from the issue text.
Description
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()
- Dominant language
- Python
- Stars
- 18.8k
- Forks
- 2.8k
- Avg merge
- 16h 26m
- Merged PRs (30d)
- 21
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from plotly/plotly.py
-
P3 size: 1 task
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
bug P1
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
feature P3
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
feature P3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
All issues in plotly/plotly.py
Similar issues
-
triage/confirmed
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
agentscope-ai/agentscope#2775 ·
-
comp/desktop P3 type/bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
NousResearch/hermes-agent#118866 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
apache/cloudstack#14222 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100