docs(charts): rewrite the inline-series chart examples into the model the renderer implements - #7679
Merged
Merged
Conversation
… the renderer implements Four chart nodes across three documentation and example sites authored the retired inline-data model -- a populated `series[].data` -- and paired it with month names in `categories`, which the renderer reads as a series list, not as axis labels. Every one of them rendered an empty chart: `normalizeSeries` has never read `series[].data`, and `categories` is ignored outright whenever `series` is present. Each is rewritten into the model `normalizeChartSchema` actually implements: rows on the chart node's own chart-level `data`, each series' `name` naming the column it plots within those rows, and `xAxisKey` naming the category column. The numbers and the visible intent of every example are preserved. `schema-reference.md`'s property table is corrected on the same reading: the `categories` row said "X-axis category labels" and now states the alternative-series-list meaning; the `series` row no longer advertises a `data` array and names the type correctly as `ChartDataSeries[]` (it had said `ChartSeries[]`, which `@objectstack/spec/ui` owns for the dataset-bound descriptor); and `data` / `xAxisKey` are added as the declared members they became. Measured, not assumed: all four corrected documents pass `ChartSchema.safeParse`, and both documents they replace are refused by name on `series[].data`'s retirement tombstone -- so the instrument was not blind. The corrected example also normalizes through `normalizeChartSchema` to `xAxisKey: 'month'` and series `['Revenue', 'Expenses']`, each a real column in every row, while the document it replaced resolved no axis at all. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0114Ytxr5sM1vdW19Y9WAx6E
Contributor
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
os-sam
marked this pull request as ready for review
September 5, 2026 02:26
This was referenced Sep 5, 2026
os-sam
pushed a commit
that referenced
this pull request
Sep 5, 2026
Resolves the one conflict, content/docs/api/schema-reference.md: #7679 rewrote the chart node's property table (categories / data / xAxisKey rows) while this branch rewrote the series row to list the declared per-series keys. Kept main's table structure and folded the declared keys into its series row. No lockfile or generated file moved on main since the merge-base. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KbJQ1y1J12nZxYzFWhP8Q3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #7112
Four chart nodes across three documentation and example sites authored the retired inline-data model — a populated
series[].data— and paired it with month names incategories, which the renderer reads as a series list, not as axis labels. Each rendered an empty chart:normalizeSerieshas never readseries[].data, andcategoriesis ignored outright wheneverseriesis present. Every one is rewritten into the modelnormalizeChartSchemaimplements — rows on the chart node's own chart-leveldata, each series'namenaming the column it plots within those rows,xAxisKeynaming the category column — preserving each example's numbers and visible intent.Sites, as measured on this tree (not as the card counted them)
The card measured five sites on
2c3cd1b75with tilde-prefixed line refs. Re-derived ona472b0716, the population is 4 chart nodes across 3 files, carrying 6series[].dataarrays between them, plus 2 incorrect property-table rows. The card's "five" counted the twoseries[].dataarrays in the firstschema-reference.mdexample as two sites; its own table row for the examples JSON says "2" for what is one node with two series. All four nodes are corrected here.packages/types/examples/data-display-examples.jsoncategories+series[].datatodatarows +xAxisKeycontent/docs/api/schema-reference.mdChartSchemaexample and the dashboard widgetcontent/docs/core/report-schema.mdxtype: 'line'overrideA repo-wide sweep for the retired shape across
content/,skills/,examples/,apps/,packages/and the READMEs now returns zero authoredseries[].dataoutside the pin tests that deliberately assert its refusal.content/docs/plugins/plugin-charts.mdxalready taught the correct model and is untouched — the corrected pages now agree with it.The property table (
schema-reference.md)categoriessaid "X-axis category labels"; it now states the alternative-series-list meaning, that it is read only whenseriesis absent, and that the category axis comes fromxAxisKey.seriesno longer advertises adataarray, and names the type correctly asChartDataSeries[]— it saidChartSeries[], a name@objectstack/spec/uiowns for the dataset-bound descriptor (objectstack#4115).dataandxAxisKeyare added as rows. Both are declared members ofChartSchemaon this tree (packages/types/src/data-display.ts:1459and:1469, landed by objectui#7113), so this documents declared keys, not index-signature ones — the contract question the card fenced off is discharged, and nothing here settles it by prose.Evidence
Both legs, so neither reading is blind:
ChartSchema.safeParseagainst the built@object-ui/typesmirror.series[0].data/series[1].dataon theChartDataSeries.dataretirement tombstone (objectui#6896) — the instrument can produce a refusal, so the four passes mean something.xAxisKey: 'month'and series['Revenue', 'Expenses'], each a real column in every row; the document it replaced resolved no axis at all and its numbers were dropped. Verified in a scratch spec againstnormalizeChartSchema, removed before commit.Checks, at
ca53fe28bGreen:
check:doc-types·check:doc-fences·check:control-bytes·check-changeset-presence·docs:check-links·pnpm exec vitest run packages/types/(103 files, 1731 tests) ·pnpm --filter @object-ui/types type-check(including itstsconfig.examples.jsonproject).Declared narrowing —
check:doc-snippets. Its build closure is 26 packages, so it is left to CI, which builds it anyway. The narrowing is measured, not asserted: that gate's entire input surface ists/tsx/typescriptfences, and in both changed documents those fence bodies are byte-identical before and after this diff (schema-reference.md2 fences,report-schema.mdx3 fences; SHA-256 of the concatenated bodies unchanged on both), with a positive control confirming the comparison registers a real one-character edit. Every change here lands injsonfences, oneplaintextfence, a Markdown table and prose.No changeset, and none is owed — not a
skip-changesetclaim.check-changeset-presenceat this commit: "3 file(s) changed, 0 of them published source of a package the release covers, 0 of them a manifest whose published contract moved… No source or published contract of a released package changed in this range, so no changeset is owed."packages/typespublishes onlydist,README.md,CHANGELOG.mdandLICENSE, soexamples/never ships.One card claim corrected
The card states nothing "imports, type-checks, parses or renders" the example files. Parses is false:
packages/types/src/__tests__/timeline-items-row-shape-7164.test.ts:162readsdata-display-examples.jsonfrom disk andsafeParsesexamples.timeline. It does not touchexamples.chart, so this diff's blast radius is unchanged and the fullpackages/typessuite is green — but the file is not unread. Imports, type-checks and renders hold: nothing imports it,tsconfig.examples.jsonincludes onlyexamples/**/*.ts, and no renderer mounts it.🤖 Generated with Claude Code
https://claude.ai/code/session_0114Ytxr5sM1vdW19Y9WAx6E
Generated by Claude Code