plotly / plotly/plotly.py

[BUG]: Plotly (Dash) not updating xaxes range via Patch method when subplots are horizontal

Open
#5,480 2 comments 0 reactions 1 assignee View on GitHub

@emilykl is already working on this.

Since Feb 4, 2026.

bug
Dominant language
Python
Stars
18.8k
Forks
2.8k
Avg merge
16h 26m
Merged PRs (30d)
21

Description

Description

Plotly (Dash) not updating xaxes range via Patch method when 2 subplots are horizontal make_subplots(rows=1, cols=2, shared_xaxes="all"). It works fine when the two subplots are vertical.

Plotly / Dash versions
plotly 6.5.2
dash 3.4.0

Screenshots/Video

Horizontal: On 1st Forward or Backward click half the trend disappears, because the range does not get updated.
Image

Horizontal: On 2nd Forward or Backward click half the trend disappears, because the range does not get updated.
Image

Vertical Subplots are OK! You can hit Forward/Backward as many times as you want
Image

Steps to reproduce
  1. Run attached code
  2. When Dropdown is Horizontal (default), use Forward/Backward button and trend will disappear in two clicks. The x-range does not keep up when the trend is updated via the Patch method patched_figure["layout"][f"xaxis{index + 1}"]["range"] = [now, now + timedelta(days=4)]
  3. When Dropdown is Vertical, all works as is should. You can hit Forward/Backward as many times as you want.

plotly_dash_patch.py

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.