Skip to content

finding(docs/types): five documentation and example sites author the retired ChartDataSeries.data and teach categories as X-axis labels #7112

Description

@os-warren

Measured while implementing #6896 (PR #7111), filed unassigned and not fixed there — that
card's dispatched file surface is packages/types/src/data-display.ts + its zod twin, the
retirement machinery, and packages/plugin-charts/ only where a comment must follow. These five
sites are outside it. Recorded here so they are not lost.

Measured on origin/main 2c3cd1b75.

The sites

All five author the inline-static-data chart model that #6896's ruling retired — a populated
series[].data — and four of them pair it with month names in categories, which the docblock
described as X-axis labels and the renderer reads as a series list:

file sites shape
packages/types/examples/data-display-examples.json 2 categories: ["Jan"…"Jun"] + series[].data
content/docs/api/schema-reference.md (~464, ~469) 2 same, plus a property table row reading categories | string[] | X-axis
content/docs/api/schema-reference.md (~966) 1 categories: ["Mon"…"Fri"] + series[{ name, data }]
content/docs/core/report-schema.mdx (~324) 1 categories: ['January'…] + series[{ name, type, data }]

Why this matters, and what it is not

Each of these renders an empty chart today, before any retirement: normalizeSeries never
reads series[].data, and categories is ignored outright whenever series is present. So an
author copying any of them gets neither the plotted numbers nor the labelled axis the page
promises. That is the same textbook-vs-implementation fork #6896 was graded p2 for, in the
channel authors actually read.

Once PR #7111 lands, the failure mode changes but does not go away: the copied data becomes a
named parse refusal carrying its remedy, which is a strict improvement over the silent drop
— but the pages still teach the wrong model, and the categories prose in
schema-reference.md's property table still contradicts the corrected declaration.

⚠️ The zero this corrects. #6896's ruling records zero authorship of a populated
series[].data outside tests across packages/ / apps/ / examples/. Re-measured on
2c3cd1b75 with a control that had to hit in the same query — the instrument scores 4 sites in
packages/types/src/__tests__/report-schema-authoring-face.test.ts, so it was not blind — one
site sits inside those roots (packages/types/examples/) and four outside them. This does
not disturb the ruling's conclusion: none of the five is a consumer. Nothing imports,
type-checks, parses or renders any of them; packages/types publishes only dist, README.md,
CHANGELOG.md and LICENSE, so examples/ never ships; and the mdx block sits inside a
plaintext fence, so check:doc-snippets does not cover it. They are instances of the
divergence, not users of a working inline-data model — which is why the retirement was still
the right call and why they were left for a separate, docs-reviewed change.

What a fix would do

Rewrite each example into the model the renderer implements — chart-level data rows,
per-series name / dataKey naming the column, xAxisKey naming the category axis — and
correct schema-reference.md's categories table row to the series-list meaning, matching the
declaration PR #7111 corrected. Worth deciding as part of it: chart-level data and xAxisKey
are not declared on ChartSchema at all and survive only through BaseSchema's index
signature, so the correct replacement text currently documents undeclared keys. That is a
separate contract question and should not be settled inside a docs pass.

⛔ Not the same defect family as #4466 / #4497 / #4507 / #4673 / #4683 / #4695, which are all
about buildChartSeries on the dataset-bound path. Deduped against those and against #6896
before filing.

Activity

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

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationdomain:specobjectui spec stream: fix lands on packages/types, schema corpus or spec pin coupling — spec lanepriority:p2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions