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.
API
Properties
Every property declared by this interface, with its type, optionality and default.
- indexrequirednumber
- Slice index in the original data array.
- drequiredstring
- SVG <path d="…"> for the trapezoid.
- colorrequiredstring
- Resolved CSS colour string.
- categoryrequiredstring
- Category label (from categories[index] or fallback).
- valuerequirednumber
- Raw numeric value from series.data[index].
- formattedrequiredstring
- Pre-formatted value string.
- visiblerequiredboolean
- Whether this slice is currently visible (legend toggle).
- labelXrequirednumber
- Label anchor X — centre of the trapezoid face for inside placement; right-edge midpoint + offset for outside.
- labelYrequirednumber
- Label anchor Y.
- labelAnchorrequired'middle' | 'start'
- SVG text-anchor attribute matching labelX placement.
- leaderXrequirednumber
- Y of the leader-line target (band right edge midpoint).
- labelFitsInsiderequiredboolean
- 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