Repository navigation
Fix rangebreaks that overlap two or more located breaks - #8167
Open
Tornacyclo wants to merge 2 commits into
Open
Tornacyclo wants to merge 2 commits into
Tornacyclo wants to merge 2 commits into
Conversation
addBreak widened every located break that a new break overlapped, but it did not merge them. A holiday break between two overnight breaks thus counted 24 hours two times in the axis scale and in the autorange break length. The axis lost one day per holiday, or the l2p slope became negative and the trace did not appear.
KoolADE85
self-requested a review
November 10, 2026 20:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge every located break that a new rangebreak overlaps, so that the located breaks never overlap.
Closes #7270. The same cause gives the symptoms in #5783 and in plotly/plotly.py#2998.
Cause: if a new break overlapped two located breaks,
addBreakinax.locateBreakswidened the two breaks but did not merge them.setScaleandcalcBreaksLengthsum the break lengths, so they counted the overlap two times. A holiday between two overnight breaks thus adds 24 extra hours:Fix:
addBreakkeeps the first overlapped break, extends it to the union, and removes the other overlapped breaks. If a new break overlaps zero or one located break, the output does not change.Tests: a new spec in
axes_test.js(*rangebreaks*>during setConvert) fails onmainand passes with the fix. Other suites that use rangebreaks:range_slider,cartesian_interact,hover,draw_newshape,draw_newselection. The 24 image mocks withrangebreaksgive the same located breaks before and after the fix, so no baseline changes.