[BUG] DCC graph rendering of 'relative' bar inconsistent
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 24.4k
- Forks
- 2.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 13
Description
Describe your context
fig.show() has consistent relative bar positions. dcc.Graph (on the same data) mixes relative and overlaid within the same graph
dash 3.2.0
dash-bootstrap-components 2.0.3
dash-bootstrap-templates 2.1.0
dash-core-components 2.0.0
dash_daq 0.6.0
dash-html-components 2.0.0
dash-table 5.0.0
Describe the bug
Dataframe driven dataset, many columns, some negative and some positive. Set with relative barmode.
fig.update_layout(barmode='relative', bargap=0, showlegend=False,)
When calling from fig.show(), the results are properly relative
fig = netchart()
fig.show()
When calling from a dash webpage, with dcc.graph on the same data, the resulting figure is partially stacked and partially displayed as overlaid data
from . import dashboard_charts
dcc.Graph(figure=dashboard_charts.netchart(), id="ret-netchart")
Expected behavior
Both should correctly display relative data, dcc.Graph should not render two different barmodes within the same dataset when only one was specified.
Screenshots
fig.show()
dcc.Graph
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.
Research direction
Start by reproducing the issue through dcc.Graph using the reported versions and compare it with fig.show() for the same relative bar chart. Trace how dcc.Graph receives and renders the figure, then verify that all bars use relative positioning consistently in the browser without changing the figure's barmode.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- plotly, python
- Domain
- data-visualization, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100