IChartProps
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.
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.
- typeTChartType
- Visualisation primitive. Default "line".
- seriesrequiredArray<IChartSeries>
- Data series — one or more. Empty array renders the #empty slot.
- categoriesArray<string>
- X axis labels (for line/area/bar/column/radar). Length should match the longest series; missing entries fall back to the numeric index.
- titlestring
- Optional title rendered above the plotting area.
- subtitlestring
- Optional subtitle rendered below the title.
- showLegendboolean
- Toggle the legend block. Default true.
- legendPositionTChartLegendPosition
- Anchor of the legend block. Default "bottom".
- showTooltipboolean
- Toggle the hover tooltip. Default true.
- showGridboolean
- Render grid lines behind the plot. Ignored for pie/donut/radar. Default true.
- showAxisboolean
- Render X / Y axes + tick labels. Ignored for pie/donut. Default true.
- animatedboolean
- Animate paths / bars / slices on first paint and on data changes. Respects prefers-reduced-motion. Default true.
- animationDurationnumber
- Animation duration in ms. Default 600.
- stackedboolean
- Stack series on bar / column. Default false.
- stackingTChartStacking
- Stacking mode when stacked=true. "normal" = raw absolute values (default); "percent" = every stack normalised to 100%.
- donutHoleSizenumber
- Inner-radius proportion for donut. 0 collapses to a pie, 1 to a ring of zero thickness. Default 0.6 when type === "donut".
- colorSchemeArray<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.
- aspectRatiostring
- CSS aspect-ratio shortcut ("16/9", "4/3", "1/1"…). When set, overrides height and lets the chart breathe with the container width.
- smoothingTChartSmoothing
- Smoothing strategy for line/area. Default "none" — straight segments. "curve" uses cubic Bezier with Catmull-Rom tangents.
- yMinnumber
- Override the auto-computed Y min.
- yMaxnumber
- Override the auto-computed Y max.
- gaugeMinnumber
- Lower bound of the gauge range. Ignored unless type="gauge". Default 0.
- gaugeMaxnumber
- Upper bound of the gauge range. Ignored unless type="gauge". Default 100.
- gaugeUnitstring
- Optional unit appended to the gauge centre label (e.g. "%", " km/h"). Ignored unless type="gauge".
- plotBandsArray<IChartPlotBand>
- Coloured rectangular zones drawn behind (or above) chart data. Forwarded to cartesian charts only.
- plotLinesArray<IChartPlotLine>
- Threshold lines drawn at a fixed axis value. Forwarded to cartesian charts only.
- annotationsArray<IChartAnnotation>
- Overlay annotations drawn on top of the series layer. Forwarded to cartesian charts only. Four kinds: "arrow", "label", "circle", "bracket".
- drilldownIChartDrilldownProps
- secondaryYAxisIChartSecondaryYAxis
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