Interface: Chart
Defined in: packages/core/src/dashboard.ts:65
A live chart returned by Dashboard.chart.
Properties
| Property | Modifier | Type | Description |
|---|---|---|---|
data | readonly | ChartData | null | The latest aggregates, or null before the first update. |
filter | readonly | Filter | null | This chart's own filter, or null. |
id | readonly | string | The chart's id, which is also its key in the filter store. |
ready | readonly | Promise<DimensionInfo> | Resolves once the engine has indexed the dimension. |
Methods
apply()
ts
apply(intent): void;Defined in: packages/core/src/dashboard.ts:75
Apply an intent as if the renderer had emitted it.
Parameters
| Parameter | Type |
|---|---|
intent | Intent |
Returns
void
destroy()
ts
destroy(): void;Defined in: packages/core/src/dashboard.ts:85
Remove the chart, its views, its dimension and its filter.
Returns
void
mount()
ts
mount<View>(
target,
view?,
renderer?
): () => void;Defined in: packages/core/src/dashboard.ts:81
Draw this chart in one more place, e.g. a compact copy in an overview. Every view shares the chart's data and filter. Returns a function that removes the view.
Type Parameters
| Type Parameter | Default type |
|---|---|
View | unknown |
Parameters
| Parameter | Type |
|---|---|
target | string | HTMLElement |
view? | View |
renderer? | Renderer<View> |
Returns
() => void
subscribe()
ts
subscribe(listener): () => void;Defined in: packages/core/src/dashboard.ts:83
Listen for fresh aggregates, e.g. to draw without a renderer. Returns a function that unsubscribes.
Parameters
| Parameter | Type |
|---|---|
listener | ChartListener |
Returns
() => void