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

Définition

La définition TypeScript de l'interface telle que trouvée dans le code source d'origam. Cliquez sur l'icône de copie pour copier l'extrait.

typescript

Héritage

Hérite de

Interfaces parentes dont celle-ci hérite. Leurs propriétés sont disponibles pour tout consommateur de cette interface.

API

Propriétés

Chaque propriété déclarée par cette interface, avec son type, son caractère optionnel et sa valeur par défaut.

series
requis
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).

Écosystème

Utilisé par

Composants et composables qui étendent ou consomment cette interface.

Usage

Exemples

Extraits de code prêts à coller utilisant cette interface.

Embedding a sparkline in a KPI card

vue