Skip to content

@crossplot/vue ​

Vue 3 composables for crossplot: create a dashboard, add linked charts and read the selection as refs.

Interfaces ​

InterfaceDescription
UseChartWhat useChart returns.

Type Aliases ​

Type AliasDescription
DashboardSourceA dashboard, a ref to one, or a getter; null or undefined while it loads.
RowsOptionsOptions for useRows: a page of filtered rows.

Variables ​

VariableDescription
ChartDraws one chart in a <div> with the spec's renderer or the dashboard's: <Chart :dashboard="dash" :spec="spec" />. Attributes such as class and style go on the div. Same lifetime rules as useChart. The component exposes chart, data, filter and reset.

Functions ​

FunctionDescription
useChartAdd a chart to a dashboard for as long as the calling component lives.
useDashboardCreate a dashboard and destroy it when the calling component unmounts (or its effect scope stops). The ref holds null until the engine has loaded the data, and always during server rendering.
useFilterOne chart's filter by id, or null.
useFiltersEvery filter, by chart id: the same plain object as dashboard.filters.snapshot.filters, replaced on each change. Empty before the dashboard is ready.
useRowsThe filtered rows, fetched again after every update and whenever the query changes. Null until the first page arrives.
useSummarySelected and total row counts after the latest update, or null before the dashboard is ready.

Released under the MIT License.