Skip to content

Prune unused Cartesian axes before rendering - #636

Open
rosenrot00 wants to merge 1 commit into
dbuezas:masterfrom
rosenrot00:only-used-cartesian-axes
Open

Prune unused Cartesian axes before rendering#636
rosenrot00 wants to merge 1 commit into
dbuezas:masterfrom
rosenrot00:only-used-cartesian-axes

Conversation

@rosenrot00

@rosenrot00 rosenrot00 commented Jul 30, 2026

Copy link
Copy Markdown
  • track Cartesian axes explicitly configured in card YAML or presets
  • keep axes referenced by parsed traces, shapes, annotations, grids, or other axes
  • prune generated Cartesian axes that are unused before passing the layout to Plotly
  • preserve the base xaxis and yaxis

The current defaults materialize up to 30 X-axis and 30 Y-axis layout entries for every card. Plotly processes all of them on every react(), even when a simple chart only uses one X and one Y axis.

Pruning after configuration evaluation is important because entity axis assignments can be dynamic or derived from units. At that point all $fn values and automatic Y-axis assignments are known, so unused defaults can be removed without guessing.

The integration test verifies that a simple parsed chart keeps exactly xaxis and yaxis. Explicit YAML and preset axes, trace references, layout references, and axis-to-axis references remain intact.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant