Skip to content

Axis handling gaps found while reviewing linked axes #81

Closed

Description

@jvdd

Found during the review of PR #77. Each item existed on main before that PR, and each is checked as noted.

  1. A layout autorange: "reversed" is lost on the first render. Confirmed in a browser. syncLayoutViewport (flexviz/adapters/js/plotly/render.js) sets autorange = true for every axis without a viewport key. fig.update_layout(xaxis={"autorange": "reversed"}) on a line renders 0..999 normal (_fullLayout.xaxis.autorange is true).
  2. axes=("y", "x") maps columns to the wrong axis. Confirmed. figure_axis_columns (flexviz/spec.py) follows the trace role convention: axes[0] shows backend_data["x"]. For add_line(x="ts", y="v", axes=("y", "x")) it returns {"y": {"ts"}, "x": {"v"}}. recompute_axes and linked axes (link_axes(on="ts") would link fig/y) depend on that mapping.
  3. A flexvizApply that locks axes does not update the lock UI. Confirmed in a browser. After flexvizApply({client_state: {axis_locks: ..., axis_lock_ranges: ...}}), the range is pinned (100..200), but the panel button still reads "Lock Axes" and the drag mode stays zoom.
  4. The cube path does not normalize reversed viewport ranges. Confirmed in code only; the effect is untested. FlexEngine.process swaps descending (hi, lo) pairs at ingestion (_normalize_axis_ranges), but build_cubes receives viewports_by_figure without that step, so _cube_axis_range can see a reversed pair.

Activity

  1. added
    bug
    on Sep 23, 2026
  2. jvdd commented on Sep 23, 2026

    @jvdd
    ContributorAuthor
    1. A numeric column on an axis set to type: "date" fails on zoom with 500. Confirmed in a browser (2026-09-23). An epoch-ms column with fig.update_layout(xaxis={"type": "date"}) renders as dates, but a drag sends date strings ('2024-01-03 02:55:57.3034'), and the line trace fails in bucket_grid with TypeError: unsupported operand type(s) for -: 'str' and 'str'. Linked axes refuse this combination since PR feat: linked axes across dashboard figures #77 (5e51aae). Fix direction: convert date-string bounds to epoch ms for numeric columns on date-typed axes, or document that numeric time columns should be cast to Datetime.
  3. jvdd commented on Sep 29, 2026

    @jvdd
    ContributorAuthor

    Status after #110 and #117:

  4. jvdd commented on Sep 29, 2026

    @jvdd
    ContributorAuthor

    Decision on item 5 (2026-09-29): reject the setup. A numeric column on an axis with type "date" fails fast with a message that tells the user to cast the column to Datetime. This matches what linked axes do since PR #77. Item 3 is fixed on main by d370e8f, so item 5 is the only open item.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions