fix(adapters): keep log axis viewports in data units - #113
Merged
Merged
Conversation
jvdd
force-pushed
the
fix/log-axis-viewport
branch
from
September 27, 2026 22:29
6abd79c to
22adf68
Compare
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.
Closes #74. Does step 1 of #98.
Change
state.viewport,client_state.axis_lock_ranges) now always holds data units, as the server and the selections expect.plotly/render.js,plotlyRangeToDataandplotlyRangeFromData, convert where Plotly ranges meet client state:syncLayoutViewportandfvApplyAxisLocks.isLogAxis): the axistype, else thetypein the layout template, as in Plotly. The first render writes the layout before Plotly draws the div, so both directions use the same source.Infinity(JSONnull, HTTP 422) or 0.link_axesstill rejects log axes. The message now says that log axes are not linkable yet, and the comment gives the reasons: a linear member of a group can zoom to a range at or below 0, and a group of log axes only is not designed yet.Architecture.mddescribes the units and the conversion.Impact
update_layout(template=...).Not in this PR
_fvOutlineDataRangeusesp2r) and linked hover guides (l2p) are still in log10 units on a log axis (fix(adapters): draw linked hover and the edit-drag preview in data units on a log axis #118).flexvizApplyor a hand-edited spec: A viewport at or below 0 on a log axis: the client shows another range than the server aggregates #121.Tests
TestLogAxisBrowser: a real mouse drag zoom (with the log type on the axis and in the layout template), a saved viewport on open, a far zoom-out, an axis lock with double-click and reset, and a selection band on a log count axis. Each fails onmain, except the far zoom-out:mainsends the log10 bounds, which are finite, so that test guards the clamp of this PR. The template case also fails without its commit.main:pytest tests: 2289 passed, 1 skipped.pytest -m browser tests: 323 passed, 12 skipped.