Skip to content

Fix rangeslider reset after zooming out - #8098

Open
Lexachoc wants to merge 3 commits into
plotly:mainfrom
Lexachoc:fix-rangeslider-autorange
Open

Lexachoc wants to merge 3 commits into
plotly:mainfrom
Lexachoc:fix-rangeslider-autorange

Conversation

@Lexachoc

@Lexachoc Lexachoc commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Description

Closes #6903.

The existing rangeslider test did not fully cover resetting an autoranged rangeslider after the axis range had been expanded. This is a regression introduced in v1.40.0.

This PR also fixes the same reset issue for rangesliders with an explicitly configured range, for example:

      "rangeslider": {
        "range": [-2, 4]
      },

Existing test updates

I think the effective rangeslider range can expand as needed to cover the current axis range, but it should not overwrite the user-specified rangeslider range.

So, I updated the existing tests:

  1. the input range should remain unchanged
  2. the effective range in _fullLayout can expand to cover the current axis range

Results

Using mock: http://localhost:3000/devtools/test_dashboard/index.html#range_slider_initial_expanded

Click Zoom out 5 times, then click Reset axes (the same issue occurs with Autoscale).

Before:
image

After:
image


Using mock: http://localhost:3000/devtools/test_dashboard/index.html#range_slider_multiple

The heatmap rangeslider has an explicitly configured range.

Click Zoom out 5 times, then click Reset axes (the same issue occurs with Autoscale).

Before:
image

After:
image


@Lexachoc Lexachoc changed the title Fix rangeslider autorange Fix rangeslider reset after zooming out Oct 1, 2026
@Lexachoc
Lexachoc marked this pull request as ready for review October 1, 2026 18:44
@camdecoster camdecoster self-assigned this Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rangeslider won't reset after zooming out

2 participants