IChartLegendItem

interface
Chart

Aggregated legend entry — one per series. Pre-resolved colour so the legend renderer doesn't have to re-look-up the palette. Produced by useChart().legend.value.

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.

series
required
IChartSeries
The series this legend entry represents.
index
required
number
Zero-based index of the series in the parent chart series array.
color
required
string
Pre-resolved CSS colour string for the swatch.
visible
required
boolean
Current visibility state — toggled when the user clicks the legend entry.

Ecosystem

Used by

Components and composables that extend or consume this interface.

Usage

Examples

Ready-to-paste code snippets using this interface.

Rendering a custom legend from the composable

typescript