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
Definition
The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.
API
Properties
Every property declared by this interface, with its type, optionality and default.
- seriesIndexrequirednumber
- Zero-based index of the parent series.
- kindrequired'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'.
- colorrequiredstring
- Resolved CSS colour string.
- seriesrequiredIChartSeries
- 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').
Ecosystem
Used by
Components and composables that extend or consume this interface.
Usage
Examples
Ready-to-paste code snippets using this interface.
Accessing path descriptors from the chart composable