Components
BaseSparkline
A small trend without axes drawn with ECharts, with the previous period, an end point and scrubbing.
components/ui/chart/BaseSparkline.vue
View in the demo
Example
area
line
column
previous-series
curve: straight
API
Props
Name | Type | Default | Description |
|---|---|---|---|
type | SparklineType | "line" | line, area or column. |
color | string | CHART_SERIES_TOKENS[0] | A chart token. Defaults to chart-1. |
height | string | number | 64 | The height. |
line-width | number | 3 | The stroke width. |
previous-series | number[] | — | The previous period, drawn in stone. |
curve | SparklineCurve | "smooth" | smooth or straight. |
label | string | — | The accessible name. |
interactive | boolean | true | Shows a pointer with the value on hover and with the arrow keys. |
series | ChartSeriesInput | [] | The values. |
categories | (string | number)[] | [] | Labels for the interactive pointer. |
Events
Name | Payload | Description |
|---|---|---|
@scrub | [index: number | null] | — |