fix(adapters): aggregate linked members at the range a lock pins - #116
Merged
Merged
Conversation
jvdd
force-pushed
the
fix/log-axis-viewport
branch
from
September 27, 2026 22:29
6abd79c to
22adf68
Compare
jvdd
force-pushed
the
fix/linked-lock-viewport
branch
from
September 27, 2026 22:29
302b047 to
2e494c3
Compare
…ep viewport keys after an unlock
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 the linked case of #82. The unlinked case needs a design and is not in this PR.
Change
fvLockAxisGroup(toolbar.js) compares the range each group member shows with the range of the clicked figure. If a member differs, the lock writes the group range as the viewport of the group withfvWriteViewport.fvSameRange). Figures linked on one column rarely show bit-identical ranges: a line shows[3.1e-13, 9999.0000000001]where a histogram shows[0, 9999]. Date strings keep the exact compare.fvOnToggleAxisLockscommits the written keys withfvCommitViewportChange.fvOnLockAllAxessends one commit for all groups.Architecture.mdanddocs/guides/cross-filtering.mddescribe the new behavior.Architecture.mdalso states that an unlock writes no viewport: a group whose members differed keeps its viewport keys, and a display-only group has none.Impact
n_points=200. After a lock on A, B showed 20 of its 200 points inside the window. Now all 200 are inside.Known limit
The validator requires equal viewport values in a link group, so when members differ, the clicked figure gets the group viewport too and is re-aggregated at the range it shows. A binned trace then bins on the zoomed lattice. On the weekday hist2d (y 1..7,
y_bins=7) the rows go from 7 to 8, with one empty row. A manual zoom to the same range gives the same grid onmain. #124 tracks the server fix.Tests
test_lock_aggregates_a_member_at_the_range_it_shows: counts B's points inside its window after a lock on A. Fails before the fix (20 of 200).test_lock_all_sends_one_request_for_every_group: two groups whose members differ give one request with all four keys. Fails before the fix (no request).test_lock_on_members_that_show_one_range_posts_nothing: guards the display-only rule.test_lock_on_a_line_and_histogram_of_one_column_posts_nothing: fails with the exact compare (one request posted).main,pytest tests flexviz_polars/tests: 2425 passed, 2 skipped.main,pytest -m browser tests: 334 passed, 12 skipped.