Skip to content

Interface: UseChartResult ​

Defined in: packages/react/src/use-chart.ts:5

What useChart returns.

Properties ​

PropertyModifierTypeDescription
chartreadonlyChart | nullThe live chart, or null before the dashboard is ready.
datareadonlyChartData | nullThe chart's latest aggregates, or null before the first update.
filterreadonlyFilter | nullThe chart's own filter, or null.
refreadonly(el) => voidA callback ref: put it on an element and the chart's renderer draws there with the spec's view. Leave it unused for a headless chart that you draw yourself from data.
resetreadonly() => voidClear this chart's filter.

Released under the MIT License.