IChartPyramidSlice

interface
Chart

Single slice descriptor produced by the pyramid geometry engine. Exposes the pre-computed SVG <path d="…"> for the trapezoid, the label anchor position, and all data needed to render accessibility text and tooltip content.

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.

index
required
number
Slice index in the original data array.
d
required
string
SVG <path d="…"> for the trapezoid.
color
required
string
Resolved CSS colour string.
category
required
string
Category label (from categories[index] or fallback).
value
required
number
Raw numeric value from series.data[index].
formatted
required
string
Pre-formatted value string.
visible
required
boolean
Whether this slice is currently visible (legend toggle).
labelX
required
number
Label anchor X — centre of the trapezoid face for inside placement; right-edge midpoint + offset for outside.
labelY
required
number
Label anchor Y.
labelAnchor
required
'middle' | 'start'
SVG text-anchor attribute matching labelX placement.
leaderX
required
number
Y of the leader-line target (band right edge midpoint).
labelFitsInside
required
boolean
true when the band is wide enough to host the label inside.

Ecosystem

Used by

Components and composables that extend or consume this interface.

Usage

Examples

Ready-to-paste code snippets using this interface.

Consuming slice descriptors from the pyramid engine

typescript