Repository navigation
Linked plots: synchronised axes and hover, and access to the axis ranges - #18
Merged
Merged
Conversation
…`xAxisAlign` prop.
…he plots with which its X axis is synchronised.
…ose X values are not sorted.
…se the Y axis of several plots.
…cters as possible.
…ynchronisation group when it redraws.
There was a problem hiding this comment.
🟡 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
rangesUpdatedandsetRanges()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
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.


Fixes #17.