Sparkline

1 min read

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

PropertyDescriptionTypeDefault
typetype of sparklineline | bar default
widthwidthnumber200
heightheightnumber20
datadata of sparklinenumber[] | number[][][]
isStackwhether to stackbooleanfalse
colorcolor of visual elementscolor | color[] | (index) => color'#83daad', '#edbf45', '#d2cef9', '#e290b3', '#6f63f4']
smoothuse smooth curvesbooleantrue
lineStylecustom line stylesLineProps[]
areaStylecustom area stylesPathProps[]
isGroupwhether to group seriesbooleanfalse
columnStylecustom column stylesRectProps[]