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.
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.
- seriesIndexrequisnumber
- Zero-based index of the parent series.
- kindrequis'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.
- dstring
- 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'.
- colorrequisstring
- Resolved CSS colour string.
- seriesrequisIChartSeries
- Original series reference (for tooltip / legend).
- dataIndexnumber
- Optional data index when the path represents a single point.
- pathLengthnumber
- 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