Function: useChart()
ts
function useChart<F, View>(dashboard, spec): UseChart;Defined in: packages/vue/src/index.ts:117
Add a chart to a dashboard for as long as the calling component lives.
The chart is recreated (and its filter cleared) when the dashboard or the spec's id, dimension, value or extra change. A change to view or renderer only redraws it.
Type Parameters
| Type Parameter | Default type |
|---|---|
F extends string | - |
View | unknown |
Parameters
| Parameter | Type |
|---|---|
dashboard | DashboardSource<F> |
spec | MaybeRefOrGetter<ChartSpec<F, View>> |