@crossplot/vue
Vue 3 composables for crossplot: create a dashboard, add linked charts and read the selection as refs.
Interfaces
| Interface | Description |
|---|---|
| UseChart | What useChart returns. |
Type Aliases
| Type Alias | Description |
|---|---|
| DashboardSource | A dashboard, a ref to one, or a getter; null or undefined while it loads. |
| RowsOptions | Options for useRows: a page of filtered rows. |
Variables
| Variable | Description |
|---|---|
| Chart | Draws 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
| Function | Description |
|---|---|
| useChart | Add a chart to a dashboard for as long as the calling component lives. |
| useDashboard | Create 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. |
| useFilter | One chart's filter by id, or null. |
| useFilters | Every filter, by chart id: the same plain object as dashboard.filters.snapshot.filters, replaced on each change. Empty before the dashboard is ready. |
| useRows | The filtered rows, fetched again after every update and whenever the query changes. Null until the first page arrives. |
| useSummary | Selected and total row counts after the latest update, or null before the dashboard is ready. |