A versioned, published, self-describing figure format — so a chart made today still renders, and can be verified, years from now.
Every CanvasXpress figure serializes to one portable JSON object — a data matrix plus a config — that the same engine re-renders identically across JavaScript, R and Python. As of v67.5 that object carries a schemaVersion, so a figure is self-describing and version-aware. This page publishes the format as a contract, not just a feature.
Two schemas describe the format. Agents and tools can fetch them to emit and validate specs without trial and error:
cxfigure-1.0.schema.json — the persisted {data, config} figure (the contract you save and share).cxplot-1.0.schema.json — the materialized grammar-of-graphics snapshot (mapping/layers/scales/coord/facet).The version is MAJOR.MINOR. Our commitment: any spec ever emitted still renders in a current engine, via migration if needed.
The engine ships two spec-contract utilities:
CanvasXpress.cxdiff(a, b) / specsEqual(a, b) — a structural diff of two figures (added/removed/changed paths), for reviewers, for git, and for the round-trip guarantee.CanvasXpress.provenanceHash(figure) — an optional, verifiable fingerprint over the canonicalized figure, so a figure in a report or filing can be checked by recomputing the hash.A versioned, published spec is the difference between a figure you can defend and a picture you have to trust. It underpins reproducibility, the audit trail, and regulated-environment workflows. See the architecture for how the grammar engine consumes it.