GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix rangebreaks that overlap two or more located breaks by Tornacyclo · Pull Request #8167 · plotly/plotly.js

Conversation

@Tornacyclo

@Tornacyclo Tornacyclo commented Nov 10, 2026

Copy link
Copy Markdown

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, addBreak in ax.locateBreaks widened the two breaks but did not merge them. setScale and calcBreaksLength sum the break lengths, so they counted the overlap two times. A holiday between two overnight breaks thus adds 24 extra hours:

  • The figure in Plot does not appear in some cases if rangebreaks overlap #7270 gets 100.5 h of breaks on a 99.5 h range, and the plot does not appear.
  • The candlestick in y-values overlap when using rangebreaks  plotly.py#2998 gets 360 h of breaks instead of 336 h, and the candles after Christmas draw over earlier candles.

Fix: addBreak keeps 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 on main and passes with the fix. Other suites that use rangebreaks: range_slider, cartesian_interact, hover, draw_newshape, draw_newselection. The 24 image mocks with rangebreaks give the same located breaks before and after the fix, so no baseline changes.

Before (v4.2.0) After
image image
image image

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Tornacyclo added 2 commits November 10, 2026 11:32
@Tornacyclo
Merge the located rangebreaks that one new break overlaps
bd64e23
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.
@Tornacyclo
Rename the draftlog to the pull request number
3681330
@KoolADE85
KoolADE85 self-requested a review November 10, 2026 20:30
@KoolADE85 KoolADE85 self-assigned this Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@KoolADE85 KoolADE85 Awaiting requested review from KoolADE85

At least 1 approving review is required to merge this pull request.

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@KoolADE85 KoolADE85

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Plot does not appear in some cases if rangebreaks overlap

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@Tornacyclo @KoolADE85
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.