BlogPlaygroundOne

VSparkline API


Props
name
type
default
boolean
false

Trace the length of the line when first rendered.

string | number
undefined

Amount of time (in ms) to run the trace animation.

string
'ease'

The easing function to use for the trace animation.

boolean
false

Automatically expand bars to use space efficiently.

string
undefined

Applies specified color to the control - supports utility colors with or without text- prefix (for example success, purple or text-purple) or CSS color (#033 or rgba(255, 0, 0, 0.5)). Find a list of built-in classes on the colors page.

boolean
false

Using the fill property allows you to better customize the look and feel of your sparkline.

string[]
[]

An array of colors to use as a linear-gradient.

'top' | 'bottom' | 'left' | 'right'
'top'

The direction the gradient should run.

string | number
75

Height of the SVG trendline or bars.

string
undefined

The id of the component.

string
'value'

The value of the item.

(string | number | { value: number })[]
[]

An array of string labels that correspond to the same index as its data counterpart.

string | number
7

The label font size.

string | number
4

The thickness of the line, in px.

string | number
undefined

The maximum value of the sparkline.

string | number
undefined

The minimum value of the sparkline.

(string | number | { value: number })[]
[]

The v-model value of the component. If component supports the multiple prop, this defaults to an empty array.

string | number
8

Low smooth or high line-width values may result in cropping, increase padding to compensate.

boolean
false

Show labels below each data point.

string | number | boolean
false

Number of px to use as a corner radius. true defaults to 8, false is 0.

'bar' | 'trend'
'trend'

Choose between a trendline or bars.

string | number
300

Width of the SVG trendline or bars.

Slots
never
{ index: number; value: string }

The default Vue slot.

The default slot of the v-label or v-field-label component.