IChartPath

interface
Chart

Output of useChart() — one path descriptor per series (or per data point for bar/column/scatter/pie). The component renders each entry inside a <g> according to kind.

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

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.

seriesIndex
requis
number
Zero-based index of the parent series.
kind
requis
'path' | 'rect' | 'circle' | 'polygon'
SVG element kind to emit. path for line/area/pie/donut/radar, rect for bar/column, circle for scatter + line/area markers.
d
string
Pre-computed d attribute for kind === 'path' | 'polygon'.
rect
{ x: number, y: number, width: number, height: number }
Geometry for kind === 'rect'.
circle
{ cx: number, cy: number, r: number }
Geometry for kind === 'circle'.
color
requis
string
Resolved CSS colour string.
series
requis
IChartSeries
Original series reference (for tooltip / legend).
dataIndex
number
Optional data index when the path represents a single point.
pathLength
number
Length of the path (used by stroke-dashoffset animation).
variant
'fill' | 'stroke'
Sub-kind for kind === 'path'. Area charts emit two paths per series — the filled area (variant: 'fill') and the overlaid stroke (variant: 'stroke').

Écosystème

Utilisé par

Composants et composables qui étendent ou consomment cette interface.

Usage

Exemples

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

Accessing path descriptors from the chart composable

typescript