Repository navigation
Conversation
…s of other figures
…hanges the range under a cross-filter
Contributor
Author
This branch has not been deployed
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 #80. In update mode, a figure with a cross-filter selection of its own is now filtered by the selections of the other figures, in any order. This is the model of crossfilter.js, Mosaic (
Selection.crossfilter()), Superset (PR apache/superset#14046), Power BI and Qlik.Architecture.mdalready stated it: a figure is never filtered by its own selection, only by the selections of other figures.The problem
Before this change, the data of a brush-owning figure depended on the event history, not on the state. Three figures A, B, C on
ts, update mode, A brushed and then B brushed:flexvizApply)A switch from overlay to update mode also left the owners unfiltered.
Changes
InteractionEvent.selection_figure_uidnames the figure whose selection changed. In update mode, the engine skips only that figure, because a figure's own selection never filters it. Every other figure is re-aggregated, also a figure with a selection of its own. An event without the field (a restore or a mode switch) re-aggregates every figure. Overlay mode is not changed: an owner shows only its unfiltered background.selection_figure_uid: brush, click, figure clear, summary remove and panel reset._fvCommitNeedsServer). Otherwise the owner is never refreshed.isUnfilteredBaseForFigurenow returns true only when no other figure has a selection. A zoom marks such a figure's old background stale. This was reachable before this PR (zoom an owner, then switch to overlay mode), and this PR makes it more frequent.Architecture.md, the cross-filtering and live-brushing guides andCHANGELOG.mdare updated.Trade-offs
Tests
TestEngineSelectionOwnerscovers the issue case, a cleared brush, a selection event without a changed figure, and the two overlay cases.test_selection_on_A_then_B_only_updates_Cis nowtest_selection_on_A_then_B_updates_A_and_C. The rewritten tests check the filtered x range, not only that a delta exists.TestSelectionOwnerBrowsercovers a real second brush, a restore with two brushes, and the overlay background of a zoomed owner. Five cube tests expected the commit to stay local. They now check the commit request and the owner's data against a server reference.main.