IChartParetoBar

interface
Chart

Pre-computed bar descriptor produced by the Pareto geometry engine. Contains all pre-computed values needed to render one <rect> column, its label, and the cumulative percentage dot.

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
Index in the sorted data array (0 = highest value).
category
required
string
Category label from the datum.
value
required
number
Raw numeric value from the datum.
formattedValue
required
string
Pre-formatted value string.
share
required
number
Individual share of total (0–1).
cumulative
required
number
Cumulative percentage up to and including this bar (0–1).
color
required
string
Resolved CSS colour string (for fill).
x
required
number
SVG X of the left edge of the bar.
y
required
number
SVG Y of the top edge of the bar.
w
required
number
Bar width in SVG pixels.
h
required
number
Bar height in SVG pixels.
cx
required
number
X center of the bar — used for the X-axis tick label and cumulative line dot.
dotY
required
number
Y of the cumulative percentage dot on the right Y-axis scale.

Ecosystem

Used by

Components and composables that extend or consume this interface.

Usage

Examples

Ready-to-paste code snippets using this interface.

Accessing bar descriptors from the Pareto engine

typescript