Sparkline
Spark
A mini-chart is a very small line/bar chart that is usually drawn without axes or coordinates. It represents the general shape of changes in some measures in a simple and highly condensed manner.
Usage
import { Sparkline } from '@antv/gui';
Options
Property | Description | Type | Default |
---|---|---|---|
type | type of sparkline | line | bar | default |
width | width | number | 200 |
height | height | number | 20 |
data | data of sparkline | number[] | number[][] | [] |
isStack | whether to stack | boolean | false |
color | color of visual elements | color | color[] | (index) => color | '#83daad', '#edbf45', '#d2cef9', '#e290b3', '#6f63f4'] |
smooth | use smooth curves | boolean | true |
lineStyle | custom line styles | LineProps | [] |
areaStyle | custom area styles | PathProps | [] |
isGroup | whether to group series | boolean | false |
columnStyle | custom column styles | RectProps | [] |