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
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.
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.
- typeTChartType
- Visualisation primitive. Default "line".
- seriesrequisArray<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
É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