IChartBaseProps

interface
Chart

Props shared across every origam chart type — extends ICommonsComponentProps, IDimensionProps, IMarginProps, IPaddingProps, IRoundedProps, IElevationProps and IBgColorProps. Covers series data, legend, tooltip, animation, color scheme and aspect ratio.

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.

series
requis
Array<IChartSeries>
Data series — one or more. An 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. Ignored for pie/donut/scatter.
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.
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.
colorScheme
Array<TIntent | string>
Palette used when a series does not pin its own color. Accepts intent strings or raw CSS colours. Default cycles through the 8 origam intents.
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.

Écosystème

Utilisé par

Composants et composables qui étendent ou consomment cette interface.

Usage

Exemples

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

Bar chart using the shared base props

vue