Repository navigation
feat: linked axes across dashboard figures - #77
Merged
Merged
Conversation
…lient_state.axis_links
This was referenced Sep 23, 2026
…ation and same-figure links
…ones in axis links
…specs per partition
…tes and report failed rollbacks
…duplicate figure-uid helper
…reject targets of the wrong type
…r a real linked drag
This was referenced Sep 23, 2026
Open
…re in single-figure specs
…eric columns on date axes
…nk rules and refuse other spec versions
This was referenced Sep 24, 2026
…ntry point checks it
…k groups in the skill
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.


Why
Zooming one figure did not move the others. For a dashboard of several time series, the user had to zoom each figure by hand. Linked axes share one range: zoom, pan, double-click or reset one of them, and the others follow. Every affected figure re-aggregates at the new range, in one request.
What
Event refactor (commit 1). A viewport event no longer carries
axis_rangesandfigure_uid. It names thestate.viewportkeys it changed (viewport_keys), and the engine reads every range from state. One event can therefore re-aggregate several figures. The engine rule is the same for every event type: a trace re-aggregates when one of itsrecompute_axesis listed for its figure, or onforce_update. A figure is never filtered by its own selection, so traces are partitioned by selection owner, with one pass per partition. A single-figure zoom stays one pass. The unfiltered domain probe runs once per request for all partitions.Removed, because no client used them:
POST /update(a single figure is shown as a one-figure dashboard),parse_eventonAbstractAdapterandPlotlyAdapter, and the"reset"event type.state.viewportkeys must now be"<figure_uid>/<axis_id>"and name a figure of the spec. The spec version stays 0.6: 0.6 is unreleased, and v0.1.0b3 shipped 0.5.Linking (commits 4 and 5).
ClientState.axis_linksholds groups of viewport keys. The engine never reads it.fvWriteViewport) writes a range to every key of a group.fvCommitViewportChangeredraws the other moved figures from state and sends one request, only when a changed axis binds a trace somewhere.Plotly.reactfires no relayout, so the redraws post nothing.DashboardSpecvalidator runs at every entry point (builder, share URL, import,flexvizApply, each request). It rejects:Nonecounts as absent), or mixed locks.history.record_statevalidates the whole spec and keepsaxis_linkswhen aclient_statepatch omits them.Bugs on main fixed on the way.
flexvizApplypatch emptied all layer data, kept the bad value, and made every later gesture fail with 422. It now restores the previous state and page, and rejects with the server's reason (commit 3).axes=docstring claimed that("x2", "y2")draws a second axis. It does not.Limits
viewport_keys, so it no longer re-aggregates, and it does not support links.Follow-ups: #74 (log axes), #75 (stale responses), #76 (
_programmaticOp).Tests
Nonevalue means full range; two owner partitions share one unfiltered probe./viewanswers 400 and/dashboard/updateanswers 422 for a bad link. CLI: history keeps and checks links.tests/test_dashboard_links.py): each form, merging, late resolution, every error, and the save, load and share round trip.flexvizApplyrefuses a patch that breaks a link. Also resets and double-click on a locked axis, andflexvizApplyrollback for a 422 and for a failed second request. These fail without the fixes.make test: 2229 passed.make test-browser: 280 passed.mkdocs build --strictis clean. A real mouse drag and double-click on a three-figure linked dashboard sent one POST each and moved all figures.Review follow-ups
/dashboard/update(422) through one function,check_axis_link_types. A hand-built numeric-to-Date link had returned 200 with empty data.DateandDatetimeaxes link.TimeandDurationrender as category axes, and their zoom already returns 500 on main (Zooming a Time or Duration axis returns 500 #79)./sharevalidates the spec before it issues a URL (400 instead of a URL that/viewrejects).make test: 2236 passed.make test-browser: 280 passed.mkdocs build --strictandgit diff --check mainare clean.Second review follow-ups
-,linear,date) link, socategoryandmulticategoryare rejected along withlog. Every reversed form counts:reversed,min reversed,max reversed, or a descending fixed range. A non-dict axis layout no longer gives a 500. Axes in different time zones do not link: the range is copied as wall-clock text, so one window would be two instants.filtered_onlybackgrounds.TraceInfo.figure_uidis required, and each partition builds its own specs.flexvizApplysays when the rollback also fails, and a stale error is no longer reported. The shadowed toolbar reset handlers and a duplicate helper are removed.figure 2 (hist)) instead of UUIDs, with no pydantic dump. A target of the wrong type raisesTypeError. An unknownon=column says so.tests/test_perf_choices.py, a linked browser test uses a real drag, and stale comments are fixed.extra="forbid"onInteractionEvent(it would make every ECharts request fail with 422, not only zoom); the history of d202fd6.make test: 2250 passed.make test-browser: 283 passed. Lint, format,git diff --check mainandmkdocs build --strictare clean.