Skip to content

Expose the current axis ranges - #11

Closed
jmdowrick wants to merge 1 commit into
opencor:mainfrom
jmdowrick:ranges
Closed

jmdowrick wants to merge 1 commit into
opencor:mainfrom
jmdowrick:ranges

Conversation

@jmdowrick

Copy link
Copy Markdown

Adds a rangesUpdated event, which gives the current X and Y ranges whenever they change (after a zoom, pan, or reset, or when an autoranged axis changes because the data was updated). Also adds a setRanges() method, so that an app can restore those ranges or link them across plots. Both use actual values, also for logarithmic axes.

The zoom was already kept when the data is updated, so that is now documented in the README.

Demo: a "Shared X range" checkbox links the X axes of the plots.

Fixes #1

…sUpdated event) and allow them to be set (setRanges() method), e.g., to link the X axes of several plots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@agarny

agarny commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Sorry @jmdowrick, but I am closing this. I don't mind AI-generated issues, but when it comes to PRs, I prefer to do it myself (with or without the help of AI). This allows me to control exactly what is done, rather than review something that might, or not, require further improvements.

@agarny agarny closed this Nov 27, 2026
@jmdowrick

Copy link
Copy Markdown
Author

All good on my end. I meant to raise these as drafts in case they were helpful. No worries if not. Noted for the future.

@agarny

agarny commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

I will definitely look at them, not least since I quite like some of them (e.g., #2).

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.

Expose the current axis ranges (read/write and change event)

2 participants