Report
Report protocol schemas
Report Type Enum
Source: packages/spec/src/ui/report.zod.ts
TypeScript Usage
import { Report, ReportChart, ReportColumn, ReportGrouping, ReportType } from '@objectstack/spec/ui';
import type { Report, ReportChart, ReportColumn, ReportGrouping, ReportType } from '@objectstack/spec/ui';
// Validate data
const result = Report.parse(data);Report
Properties
| Property | Type | Required | Description |
|---|---|---|---|
| name | string | ✅ | Report unique name |
| label | string | Object | ✅ | Report label |
| description | string | Object | optional | Display label: plain string or i18n translation object |
| objectName | string | ✅ | Primary object |
| type | Enum<'tabular' | 'summary' | 'matrix' | 'joined'> | ✅ | Report format type |
| columns | Object[] | ✅ | Columns to display |
| groupingsDown | Object[] | optional | Row groupings |
| groupingsAcross | Object[] | optional | Column groupings (Matrix only) |
| filter | [__schema0](./__schema0) | optional | Filter criteria |
| chart | Object | optional | Embedded chart configuration |
| aria | Object | optional | ARIA accessibility attributes |
| performance | Object | optional | Performance optimization settings |
ReportChart
Properties
| Property | Type | Required | Description |
|---|---|---|---|
| type | Enum<'bar' | 'horizontal-bar' | 'column' | 'grouped-bar' | 'stacked-bar' | 'bi-polar-bar' | 'line' | 'area' | 'stacked-area' | 'step-line' | 'spline' | 'pie' | 'donut' | 'funnel' | 'pyramid' | 'scatter' | 'bubble' | 'treemap' | 'sunburst' | 'sankey' | 'word-cloud' | 'gauge' | 'solid-gauge' | 'metric' | 'kpi' | 'bullet' | 'choropleth' | 'bubble-map' | 'gl-map' | 'heatmap' | 'radar' | 'waterfall' | 'box-plot' | 'violin' | 'candlestick' | 'stock' | 'table' | 'pivot'> | ✅ | |
| title | string | Object | optional | Chart title |
| subtitle | string | Object | optional | Chart subtitle |
| description | string | Object | optional | Accessibility description |
| xAxis | string | ✅ | Grouping field for X-Axis |
| yAxis | string | ✅ | Summary field for Y-Axis |
| series | Object[] | optional | Defined series configuration |
| colors | string[] | optional | Color palette |
| height | number | optional | Fixed height in pixels |
| showLegend | boolean | ✅ | Display legend |
| showDataLabels | boolean | ✅ | Display data labels |
| annotations | Object[] | optional | |
| interaction | Object | optional | |
| aria | Object | optional | ARIA accessibility attributes |
| groupBy | string | optional | Additional grouping field |
ReportColumn
Properties
| Property | Type | Required | Description |
|---|---|---|---|
| field | string | ✅ | Field name |
| label | string | Object | optional | Override label |
| aggregate | Enum<'sum' | 'avg' | 'max' | 'min' | 'count' | 'unique'> | optional | Aggregation function |
| responsive | Object | optional | Responsive visibility for this column |
ReportGrouping
Properties
| Property | Type | Required | Description |
|---|---|---|---|
| field | string | ✅ | Field to group by |
| sortOrder | Enum<'asc' | 'desc'> | ✅ | |
| dateGranularity | Enum<'day' | 'week' | 'month' | 'quarter' | 'year'> | optional | For date fields |
ReportType
Allowed Values
tabularsummarymatrixjoined