textposition="auto" doesn't show texts for 0 values
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
- python
- Domain
- data-visualization
Research direction
Run the provided Python reproduction with plotly.graph_objects and compare the bar labels produced by textposition="auto" and "outside" for the zero values. Trace the bar-label rendering path responsible for the automatic placement, then verify that zero-value text is displayed consistently with the explicit outside placement.
Written by the indexing model from the issue text.
Description
import pandas as pd
import plotly.graph_objects as go
df = pd.DataFrame(
{
"A": [5, 0, 7],
"B": [5, 0, 7],
},
index=[1, 2, 3],
)
fig = go.Figure(
data=[
go.Bar(
name="A",
x=df.index,
y=df["A"],
text=df["A"],
textposition="auto",
),
go.Bar(
name="B",
x=df.index,
y=df["B"],
text=df["B"],
textposition="outside",
),
]
)
fig.update_layout(
xaxis_title=None,
yaxis_title=None,
legend_title=None,
)
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