Sparkline
A sparkline component is a minimalist, inline graphic displaying trends or variations.
Props#
Sparkline#
| Prop | Type | Default | Description |
|---|---|---|---|
datarequired | Record<string, string | number>[] | The chart data. | |
| animationDuration | number | 500 | The animation duration. |
| categories | string[] | ['value'] | The categories to display, values map to keys in data. |
| colors | string[] | ['primary', 'gray'] | Colors to use for each category. |
| connectNulls | boolean | true | Whether to connect null values. |
| curveType | CurveType | The curve type of the area. | |
| showAnimation | boolean | false | Whether to show animation. |
| stack | boolean | false | Whether to stack the categories. |
| strokeWidth | number | The width of the line. | |
| variant | "line" | "solid" | "gradient" | gradient | The sparkline variant. |
Was this helpful?