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.

typescript

API

Properties

Every property declared by this interface, with its type, optionality and default.

seriesIndex
required
number
Zero-based index of the parent series.
kind
required
'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
required
string
Resolved CSS colour string.
series
required
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').

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

typescript