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

Definition

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

typescript

Inheritance

Extends

Parent interfaces this one inherits from. Their properties are available on every consumer of this interface.

API

Properties

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

type
TChartType
Visualisation primitive. Default "line".
series
required
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

Ecosystem

Used by

Components and composables that extend or consume this interface.

Usage

Examples

Ready-to-paste code snippets using this interface.

Universal chart with stacked bars and a plot line

vue