Skip to content

Fix rangeslider "fixed" rangemode using placeholder range of autoranged counter axis - #7967

Open
Guhapriya01 wants to merge 4 commits into
plotly:masterfrom
Guhapriya01:fix-rangeslider-fixed-rangemode-placeholder
Open

Fix rangeslider "fixed" rangemode using placeholder range of autoranged counter axis#7967
Guhapriya01 wants to merge 4 commits into
plotly:masterfrom
Guhapriya01:fix-rangeslider-fixed-rangemode-placeholder

Conversation

@Guhapriya01

Copy link
Copy Markdown

Fixes plotly/plotly.py#5614

Problem

With rangeslider.yaxis.rangemode: "fixed" and no explicit range, the slider renders two grey bands on initial load; toggling rangemode away and back clears them. The bands are the opp-axis masks, which shade the slider outside the fixed y-range — visible only when that range disagrees with the data.

image

Cause

rangeslider/defaults.js defaults the fixed range off yAxOut.range. When the counter axis autoranges, that is still the DFLTRANGEY [-1, 4] placeholder at supplyDefaults time. Unlike rangemode: 'auto', nothing revisits it afterwards.
Toggling works only because it forces a second supplyDefaults, by which point the axis holds its computed range.

Fix

Flag a fixed range defaulted off a not-yet-autoranged axis, and let doAutoRange fill it in via the path 'auto' already uses. The flag is deleted once consumed, so fixed resolves once and then stays put, and the internal key is not copied out to layout.

No schema change; auto, match, explicit ranges and non-autoranged axes are unaffected.

@Guhapriya01
Guhapriya01 marked this pull request as ready for review August 16, 2026 09:13
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.

[BUG]: Range slider y-axis "fixed" rangemode renders unexpected thick horizontal bars on initial load

1 participant