Skip to content

Linked plots: synchronised axes and hover, and access to the axis ranges - #18

Merged
agarny merged 12 commits into
opencor:mainfrom
agarny:issue17
Dec 1, 2026
Merged

agarny merged 12 commits into
opencor:mainfrom
agarny:issue17

Conversation

@agarny

@agarny agarny commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Fixes #17.

Copilot AI lite review requested due to automatic review settings December 1, 2026 10:45
@agarny
agarny merged commit 57aeeb5 into opencor:main Dec 1, 2026
5 checks passed
@agarny
agarny deleted the issue17 branch December 1, 2026 10:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Active moderate and critical findings remain in sync hover propagation and synchronized X-coordinate handling, so linked plots can display stale or inconsistent guides and tooltips.

2 open issues
What changed in this PR

This PR adds first-class coordination for multiple PlotWidget instances, including aligned plotting areas, synchronized axis ranges and scales, linked X-axis hover behavior, and public access to current ranges.

Changes:

  • Replaces manual margin sharing with X/Y alignment groups.
  • Adds X/Y axis synchronization for autoranging, zooming, panning, resets, logarithmic scales, and hover.
  • Adds rangesUpdated and setRanges() APIs with corresponding types, tests, documentation, and demo updates.
File Description
src/​widgets/​PlotWidget.vue Integrates alignment groups, axis synchronization, linked hover, range events, and the setRanges() API.
src/​common/​touchUtils.ts Reformats an existing explanatory comment.
src/​common/​syncUtils.ts Implements shared axis state, range and scale synchronization, and hover-group management.
src/​common/​syncUtils.test.ts Tests synchronization groups, ranges, scales, autoranging, and hover propagation.
src/​common/​common.ts Defines the public PlotGroup type.
src/​common/​alignUtils.ts Implements shared margin alignment groups.
src/​common/​alignUtils.test.ts Tests margin grouping, alignment behavior, and group lifecycle handling.
README.md Documents plot groups, synchronized axes, range APIs, and alignment behavior.
package.json Bumps the package version.
index.ts Exports the new public group and range types.
demo/​data.ts Updates the demo's alignment-group documentation reference.
demo/​App.vue Demonstrates alignment, axis synchronization, linked hover, and live range status.

Review effort: Lite

Comment thread src/widgets/PlotWidget.vue Resolved
Comment thread src/common/syncUtils.ts Resolved
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.

Linked plots: synchronised axes and hover, and access to the axis ranges

2 participants