1 reporting.plotly_decode

reporting.plotly_decode

Reconstruct finalized Plotly specifications across unused-template API removals.

Retained scientific bytes remain authoritative. A display projection may omit an unsupported template trace family only when no data or animation frame uses it. This is a rendering compatibility seam, not scientific provenance or reduction.

1.1 Classes

Name Description
DecodedPlotlyFigure Caller-owned mutable display copy and its bounded compatibility witness.

1.1.1 DecodedPlotlyFigure

reporting.plotly_decode.DecodedPlotlyFigure(
    figure,
    omitted_unused_template_paths=(),
)

Caller-owned mutable display copy and its bounded compatibility witness.

1.1.1.1 Attributes

Name Description
figure Detached reconstructed figure; do not append new trace families afterward.
omitted_unused_template_paths Exact omitted JSON paths; every active trace and its styles remain intact.

1.2 Functions

Name Description
decode_frozen_plotly Strictly decode a final figure, repairing only unused template defaults.

1.2.1 decode_frozen_plotly

reporting.plotly_decode.decode_frozen_plotly(payload)

Strictly decode a final figure, repairing only unused template defaults.

Try the original specification first. If the installed Plotly rejects it, inspect only layout.template.data. Public Plotly validation identifies unsupported family defaults; removal is allowed only when their trace type is absent from both data and animation frames. The retired template Mapbox frame may similarly lose style-only defaults when no Mapbox trace or explicit Mapbox layout exists. All actual traces, used template defaults and other layout fields remain unchanged. A second strict decode must succeed, otherwise the original failure is preserved.

Input must describe a finalized retained/static view. Appending new trace families to the returned display copy would invalidate the unused-family argument. Export/download owners keep the original immutable payload; neither sealed report transactions nor files are rewritten by this helper.

Back to top