Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .changeset/report-chart-matrix-placement-comment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
'@objectstack/spec': patch
---

fix(spec): the `ReportSchema.chart` doc comment says the chart is drawn below the table of a `matrix` report with `columns`

Clause-②: no

The doc comment on `ReportSchema.chart` said the embedded chart is plotted above the report's
table. That holds for a `tabular` or `summary` report, and for a `matrix` report without
`columns`, which renders as a grouped table. A `matrix` report with `columns` renders as a
cross-tab, and objectui's `DatasetReportRenderer` draws the chart below it. The comment now
says so. It also drops a clause saying a chart on a `joined` report "parsed and plotted
nothing": the schema refuses that key today, so the clause no longer described it.

Doc comment only: the schema accepts and refuses the same reports, and no `.describe()` text
or export changes.
8 changes: 4 additions & 4 deletions packages/spec/src/ui/report.zod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -462,11 +462,11 @@ export const ReportSchema = lazySchema(() => strictObject({

/**
* Visualization — an embedded chart plotted from the bound dataset
* (`xAxis` names a dimension, `yAxis` a measure) above the report's table.
* (`xAxis` names a dimension, `yAxis` a measure) above the report's table,
* or below it for a `matrix` report with `columns`.
*
* Refused on a `joined` report (#20161): a joined report draws each block
* as a table and never reads `chart`, and a block has no `chart` key — so a
* chart there parsed and plotted nothing.
* Refused on a `joined` report (#20161), which draws each block as a table
* and never reads `chart`; a block has no `chart` key.
*/
chart: ReportChartSchema.optional().describe('Embedded chart configuration (refused on a joined report, which draws tables only)'),

Expand Down
Loading