TanStack Charts uses a small grammar so an agent can reason from data and intent instead of selecting a monolithic chart component. The safest authoring path is explicit and repeatable.
Start at Choosing a Chart, then use the relevant example family.
Use one documentation owner for each decision:
Do not reconstruct an API from an example when the reference owns the signature. Do not restate D3 behavior when the D3 bridge links to its authoritative documentation.
Generated code should include:
It should not require readers to invent undeclared variables, hidden imports, casts, or CSS needed for correctness.
Allowed building blocks are public package exports and documented external modules. Never import a private source file because it appears convenient in the repository.
If the requested result cannot be expressed:
Do not hide a missing capability behind any, double casts, or manual DOM mutation.
Run, in order:
For dynamic charts, also test reorder, resize, empty data, replacement input, and a burst that must settle on the latest revision.
Use this structure when asking an agent to build a chart:
Question:
Data shape and semantic field types:
Required encodings:
Interaction and selection:
Responsive container:
Accessibility summary:
Expected update behavior:
Bundle constraints:
Acceptance checks:When information is missing, choose documented defaults for presentation. Ask before inventing analytical semantics, aggregations, or selection behavior that would change the meaning of the data.
Data exploration, chart recommendation, anomaly investigation, and iterative analysis belong in agent skills. The runtime remains a small deterministic rendering library.
Skills should route back to these canonical pages and official data-tool documentation. They should add problem-solving procedures and validation, not copy the API reference into another source of truth.