IUseChartOptions

interface
Composable Options

Strict, defaulted options consumed by useChart. All fields are getter thunks so the composable remains reactive without owning the prop reference. Drives path computation for all eight chart primitives.

TypeScript

Définition

La définition TypeScript de l'interface telle que trouvée dans le code source d'origam. Cliquez sur l'icône de copie pour copier l'extrait.

typescript

API

Propriétés

Chaque propriété déclarée par cette interface, avec son type, son caractère optionnel et sa valeur par défaut.

type
requis
() => TChartType
Getter returning the chart primitive type (line, area, bar, column, pie, donut, radar, gauge).
series
requis
() => Array<IChartSeries>
Getter returning the data series array. An empty array renders the #empty slot.
categories
requis
() => Array<string>
Getter returning the X-axis category labels for cartesian charts.
stacked
requis
() => boolean
Getter returning whether bar/column series are stacked.
stacking
() => TChartStacking
Optional getter returning the stacking mode (normal or percent) when stacked is true.
donutHoleSize
requis
() => number
Getter returning the inner-radius proportion for donut charts (0..1).
colorScheme
requis
() => Array<TIntent | string>
Getter returning the palette cycled when a series has no explicit color.
smoothing
requis
() => TChartSmoothing
Getter returning the line/area smoothing strategy (none or curve).
yMin
requis
() => number | undefined
Getter returning an optional override for the auto-computed Y-axis minimum.
yMax
requis
() => number | undefined
Getter returning an optional override for the auto-computed Y-axis maximum.
width
requis
() => number
Getter returning the SVG viewBox width in pixels.
height
requis
() => number
Getter returning the SVG viewBox height in pixels.
padding
requis
() => { top: number, right: number, bottom: number, left: number }
Getter returning the SVG inner padding that reserves space for axes and labels.
hiddenLabels
() => Set<string>
Optional getter returning the set of pie/donut category labels toggled off via the legend.
secondaryYAxis
() => IChartSecondaryYAxis | undefined
Optional getter for right-hand secondary Y-axis configuration. When absent series with yAxis===1 plot against the primary axis.

Écosystème

Utilisé par

Composants et composables qui étendent ou consomment cette interface.

Usage

Exemples

Extraits de code prêts à coller utilisant cette interface.

Passing options to useChart

typescript