Skip to main content

Sparkline

info

For more details about Vuetify’s usage of Sparline component, click Sparkline page.
For more prop explanations, click Vuetify Sparline API page.

Props

AttributeDescriptionTypeDefault
autoDrawTrace the length of the line when first rendered.booleanfalse
autoLineWidthAutomatically expand bars to use space efficiently.booleanfalse
autoDrawDurationAmount of time (in ms) to run the trace animation.number2000
autoDrawEasingThe easing function to use for the trace animation.string'ease'
colorApplies specified color to the control - it can be the name of material color (for example success or purple) or css color (#033 or rgba(255, 0, 0, 0.5)). You can find list of built in classes on the colors page.string'primary'
fillUsing the fill property allows you to better customize the look and feel of your sparkline.booleanfalse
gradientAn array of colors to use as a linear-gradient.Array['#f72047', '#ffd200', '#1feaea']
gradientDirectionThe direction the gradient should run.string'top'
heightHeight of the SVG trendline or bars.string|number75
labelSizeThe label font size.string|number7
labelsAn array of string labels that correspond to the same index as its data counterpart.array[]
lineWidthThe thickness of the line, in px.string|number2
showLabelsShow labels below each data point.booleanfalse
radiusFor create shapes with rounded corners.number10
smoothnumber of px to use as a corner radius. true defaults to 8, false is 0boolean|string|number10
typeChoose between a trendline or bars.string'trend'
tabindexIt determines the order of switching from one component to another with the tab key.string
valueAn array of numbers.array[0, 2, 5, 9, 5, 10, 3, 5, 0, 0, 1, 8, 2, 9, 0]
widthWidth of the SVG trendline or barsstring|number300
visibleVisibility of Sparkline component.booleantrue

Samples Component

Sparkline

Sparkline