Skip to content

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 ParameterDefault type
F extends string-
Viewunknown

Parameters ​

ParameterType
dashboardDashboardSource<F>
specMaybeRefOrGetter<ChartSpec<F, View>>

Returns ​

UseChart

Released under the MIT License.