Skip to content

[BUG] DCC graph rendering of 'relative' bar inconsistent #3405

Open

Description

@robajr

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()
Image

dcc.Graph
Image

Activity

  1. robajr commented on Aug 18, 2025

    @robajr
    Author

    Looks like it may be a plotly.js referenced version issue: validated that the NaN stacking issue in plotly/plotly.py#2743 fixes the issue.

  2. added
    bug
    P2
    on Aug 22, 2025
  3. added
    P3
    and removed
    P2
    on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions