Sparkline

A sparkline component is a minimalist, inline graphic displaying trends or variations.

Props

Sparkline

PropTypeDefaultDescription
datarequiredRecord<string, string | number>[]The chart data.
animationDurationnumber500The animation duration.
categoriesstring[]['value']The categories to display, values map to keys in data.
colorsstring[]['primary', 'gray']Colors to use for each category.
connectNullsbooleantrueWhether to connect null values.
curveTypeCurveTypeThe curve type of the area.
showAnimationbooleanfalseWhether to show animation.
stackbooleanfalseWhether to stack the categories.
strokeWidthnumberThe width of the line.
variant"line" | "solid" | "gradient"gradientThe sparkline variant.

Was this helpful?