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

Definition

The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.

typescript

API

Properties

Every property declared by this interface, with its type, optionality and default.

type
required
() => TChartType
Getter returning the chart primitive type (line, area, bar, column, pie, donut, radar, gauge).
series
required
() => Array<IChartSeries>
Getter returning the data series array. An empty array renders the #empty slot.
categories
required
() => Array<string>
Getter returning the X-axis category labels for cartesian charts.
stacked
required
() => 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
required
() => number
Getter returning the inner-radius proportion for donut charts (0..1).
colorScheme
required
() => Array<TIntent | string>
Getter returning the palette cycled when a series has no explicit color.
smoothing
required
() => TChartSmoothing
Getter returning the line/area smoothing strategy (none or curve).
yMin
required
() => number | undefined
Getter returning an optional override for the auto-computed Y-axis minimum.
yMax
required
() => number | undefined
Getter returning an optional override for the auto-computed Y-axis maximum.
width
required
() => number
Getter returning the SVG viewBox width in pixels.
height
required
() => number
Getter returning the SVG viewBox height in pixels.
padding
required
() => { 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.

Ecosystem

Used by

Components and composables that extend or consume this interface.

Usage

Examples

Ready-to-paste code snippets using this interface.

Passing options to useChart

typescript