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.
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.
- seriesrequiredArray<IChartSeries>
- Single data series. Data must be Array<number> — only one series is rendered.
- typeTChartSparklineKind'line'
- Rendering mode. 'line' — polyline connecting data points. 'area' — line with a translucent fill below. 'column' — vertical bars. 'bar' — horizontal bars.
- colorTIntent | string'primary'
- Stroke / fill intent or raw CSS colour applied uniformly to the sparkline (no palette cycling).
- lineWidthnumber1.5
- Stroke width for line and area modes in SVG pixels.
- showMarkersbooleanfalse
- Render a filled circle marker at every data point. Only meaningful for line and area modes.
- showMinbooleanfalse
- Highlight the minimum value point in red.
- showMaxbooleanfalse
- Highlight the maximum value point in green.
- showLastbooleantrue
- Highlight the last data point in the primary colour.
- markerSizenumber2.5
- Radius of highlighted marker circles in SVG pixels.
- widthnumber | string120
- CSS width of the sparkline container. Accepts a number (px) or a CSS string (100%, 8rem).
- heightnumber | string30
- 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