Interface: ChartSpec<F, View> â
Defined in: packages/core/src/dashboard.ts:42
A chart: what to group by, what to aggregate, and how to draw it. Plain and serializable apart from renderer.
Type Parameters â
| Type Parameter | Default type |
|---|---|
F extends string | - |
View | unknown |
Properties â
| Property | Modifier | Type | Description |
|---|---|---|---|
dimension | readonly | DimensionInput<F> | What to group rows by: a bin, category or top spec, a bare field name, or an [x, y] pair. |
extra? | readonly | Readonly<Record<string, AggregateSpec<F>>> | More aggregates over the same bins, by name. Each bin's results arrive in Datum.extra, e.g. { lat: mean("paleolat") } to place a map dot where its rows were in the past. |
id? | readonly | string | Filter key and chart id. Defaults to the field name ("xĂy" for grids), made unique. |
renderer? | readonly | Renderer<View> | Overrides the dashboard's renderer for this chart. |
value? | readonly | AggregateSpec<F> | Defaults to count(). |
view? | readonly | View | Passed to the renderer untouched. |