IChartProps

interface
Chart

Props accepted by <OrigamChart> — the universal chart component supporting eight visualisation primitives (line, area, bar, column, scatter, pie, donut, radar, gauge). The type prop selects the path generator inside useChart. Extends ICommonsComponentProps, IDimensionProps, IMarginProps, IPaddingProps, IRoundedProps, IElevationProps, IBgColorProps.

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

Héritage

Hérite de

Interfaces parentes dont celle-ci hérite. Leurs propriétés sont disponibles pour tout consommateur de cette interface.

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
TChartType
Visualisation primitive. Default "line".
series
requis
Array<IChartSeries>
Data series — one or more. Empty array renders the #empty slot.
categories
Array<string>
X axis labels (for line/area/bar/column/radar). Length should match the longest series; missing entries fall back to the numeric index.
title
string
Optional title rendered above the plotting area.
subtitle
string
Optional subtitle rendered below the title.
showLegend
boolean
Toggle the legend block. Default true.
legendPosition
TChartLegendPosition
Anchor of the legend block. Default "bottom".
showTooltip
boolean
Toggle the hover tooltip. Default true.
showGrid
boolean
Render grid lines behind the plot. Ignored for pie/donut/radar. Default true.
showAxis
boolean
Render X / Y axes + tick labels. Ignored for pie/donut. Default true.
animated
boolean
Animate paths / bars / slices on first paint and on data changes. Respects prefers-reduced-motion. Default true.
animationDuration
number
Animation duration in ms. Default 600.
stacked
boolean
Stack series on bar / column. Default false.
stacking
TChartStacking
Stacking mode when stacked=true. "normal" = raw absolute values (default); "percent" = every stack normalised to 100%.
donutHoleSize
number
Inner-radius proportion for donut. 0 collapses to a pie, 1 to a ring of zero thickness. Default 0.6 when type === "donut".
colorScheme
Array<TIntent | string>
Palette used when a series does not pin its own color. Default cycles through the 8 origam intents.
xAxisFormat
(value: string | number) => string
Formatter applied to X-axis tick labels.
yAxisFormat
(value: number) => string
Formatter applied to Y-axis tick labels.
aspectRatio
string
CSS aspect-ratio shortcut ("16/9", "4/3", "1/1"…). When set, overrides height and lets the chart breathe with the container width.
smoothing
TChartSmoothing
Smoothing strategy for line/area. Default "none" — straight segments. "curve" uses cubic Bezier with Catmull-Rom tangents.
yMin
number
Override the auto-computed Y min.
yMax
number
Override the auto-computed Y max.
gaugeMin
number
Lower bound of the gauge range. Ignored unless type="gauge". Default 0.
gaugeMax
number
Upper bound of the gauge range. Ignored unless type="gauge". Default 100.
gaugeUnit
string
Optional unit appended to the gauge centre label (e.g. "%", " km/h"). Ignored unless type="gauge".
plotBands
Array<IChartPlotBand>
Coloured rectangular zones drawn behind (or above) chart data. Forwarded to cartesian charts only.
plotLines
Array<IChartPlotLine>
Threshold lines drawn at a fixed axis value. Forwarded to cartesian charts only.
annotations
Array<IChartAnnotation>
Overlay annotations drawn on top of the series layer. Forwarded to cartesian charts only. Four kinds: "arrow", "label", "circle", "bracket".
drilldown
IChartDrilldownProps
secondaryYAxis
IChartSecondaryYAxis

Écosystème

Utilisé par

Composants et composables qui étendent ou consomment cette interface.

Usage

Exemples

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

Universal chart with stacked bars and a plot line

vue