IChartSparklineProps

interface
Data Visualisation

Props for OrigamChartSparkline — the tiny inline-chart family. Sparklines are compact data visualisations for embedding in table cells, KPI cards and dashboards. They have no axes, no legend, no grid by default. Extends IChartBaseProps omitting series, showLegend, legendPosition and colorScheme.

TypeScript

Definition

The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.

typescript

Inheritance

Extends

Parent interfaces this one inherits from. Their properties are available on every consumer of this interface.

API

Properties

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

series
required
Array<IChartSeries>
Single data series. Data must be Array<number> — only one series is rendered.
type
TChartSparklineKind
'line'
Rendering mode. 'line' — polyline connecting data points. 'area' — line with a translucent fill below. 'column' — vertical bars. 'bar' — horizontal bars.
color
TIntent | string
'primary'
Stroke / fill intent or raw CSS colour applied uniformly to the sparkline (no palette cycling).
lineWidth
number
1.5
Stroke width for line and area modes in SVG pixels.
showMarkers
boolean
false
Render a filled circle marker at every data point. Only meaningful for line and area modes.
showMin
boolean
false
Highlight the minimum value point in red.
showMax
boolean
false
Highlight the maximum value point in green.
showLast
boolean
true
Highlight the last data point in the primary colour.
markerSize
number
2.5
Radius of highlighted marker circles in SVG pixels.
width
number | string
120
CSS width of the sparkline container. Accepts a number (px) or a CSS string (100%, 8rem).
height
number | string
30
CSS height of the sparkline container. Accepts a number (px) or a CSS string (100%, 2rem).

Ecosystem

Used by

Components and composables that extend or consume this interface.

Usage

Examples

Ready-to-paste code snippets using this interface.

Embedding a sparkline in a KPI card

vue