New to Kendo UI for Vue? Start a free 30-day trial

Sparkline

Component

Definition

Package:@progress/kendo-vue-charts

Properties Interface:SparklineProps

Syntax:

vue
<Sparkline :type="'column'" :data-items="[10, 20, 15, 30, 25]" />

Properties

Overrides the default options of the Chart axes.

Example:
vue
<Chart :axis-defaults="{ majorGridLines: { visible: false } }" />

Sets the data for the default Sparkline series. The Sparkline ignores it when you set series.

Example:
vue
<Sparkline :data-items="[10, 20, 15, 30]" />

dir?

string

Sets the dir HTML attribute of the Chart. Use rtl to render the Chart from right to left.

Example:
vue
<Chart :dir="'rtl'" />

Fires when the user clicks an axis label.

Parameters:eventAxisLabelClickEvent
Example:
vue
<Chart @axislabelclick="handleAxislabelclick" />

onDrag?

(event: DragEvent) => void

Fires while the user drags the Chart with the mouse or with swipe gestures.

Parameters:eventDragEvent
Example:
vue
<Chart @drag="handleDrag" />

onDragend?

(event: DragEndEvent) => void

Fires when the user stops dragging the Chart.

Parameters:eventDragEndEvent
Example:
vue
<Chart @dragend="handleDragend" />

Fires when the user starts dragging the Chart.

Parameters:eventDragStartEvent
Example:
vue
<Chart @dragstart="handleDragstart" />

Fires when the user clicks a legend item (see example).

Parameters:eventLegendItemClickEvent
Example:
vue
<Chart @legenditemclick="handleLegenditemclick" />

Fires when the user hovers over a legend item.

Parameters:eventLegendItemHoverEvent
Example:
vue
<Chart @legenditemhover="handleLegenditemhover" />

Fires when the user clicks a note.

Parameters:eventNoteClickEvent
Example:
vue
<Chart @noteclick="handleNoteclick" />

Fires when the user hovers over a note.

Parameters:eventNoteHoverEvent
Example:
vue
<Chart @notehover="handleNotehover" />

Fires when the user clicks the plot area. The tap and contextmenu events also trigger the click event. To tell the original events apart, check the e.originalEvent.type field.

Parameters:eventPlotAreaClickEvent
Example:
vue
<Chart @plotareaclick="handlePlotareaclick" />

Fires when the user hovers over the plot area (see example).

Parameters:eventPlotAreaHoverEvent
Example:
vue
<Chart @plotareahover="handlePlotareahover" />

onRender?

(event: RenderEvent) => void

Fires when the Chart is ready to render on the screen (see example). For example, you can use it to remove loading indicators. The Chart ignores any changes that you make to the options.

Parameters:eventRenderEvent
Example:
vue
<Chart @render="handleRender" />

onSelect?

(event: SelectEvent) => void

Fires when the user changes the selection.

The range units are:

  • Generic axis—Category index (0-based).
  • Date axis—Date instance.
Parameters:eventSelectEvent
Example:
vue
<Chart @select="handleSelect" />

Fires when the user finishes changing the selection (see example).

The range units are:

  • Generic axis—Category index (0-based).
  • Date axis—Date instance.
Parameters:eventSelectEndEvent
Example:
vue
<Chart @selectend="handleSelectend" />

Fires when the user starts changing the axis selection.

The range units are:

  • Generic axis—Category index (0-based).
  • Date axis—Date instance.
Parameters:eventSelectStartEvent
Example:
vue
<Chart @selectstart="handleSelectstart" />

Fires when the user clicks the Chart series.

The tap and contextmenu events also trigger the click event. To tell the original events apart, check the e.originalEvent.type field.

Parameters:eventSeriesClickEvent
Example:
vue
<Chart @seriesclick="handleSeriesclick" />

Fires when the user hovers over the Chart series.

Parameters:eventSeriesHoverEvent
Example:
vue
<Chart @serieshover="handleSerieshover" />

onZoom?

(event: ZoomEvent) => void

Fires while the user zooms the Chart with the mouse wheel.

Parameters:eventZoomEvent
Example:
vue
<Chart @zoom="handleZoom" />

onZoomend?

(event: ZoomEndEvent) => void

Fires when the user stops zooming the Chart.

Parameters:eventZoomEndEvent
Example:
vue
<Chart @zoomend="handleZoomend" />

Fires when the user starts to zoom the Chart with the mouse wheel.

Parameters:eventZoomStartEvent
Example:
vue
<Chart @zoomstart="handleZoomstart" />

Chart configuration options.

Values provided through nested configuration components take precedence over matching values in this object.

Overrides the default options of the Chart panes.

Example:
vue
<Chart :pane-defaults="{ background: '#f5f5f5' }" />

Sets the configuration of the Chart panes.

Example:
vue
<Chart :panes="[{ name: 'top' }, { name: 'bottom' }]" />

Sets whether you can pan the Chart (see example).

Example:
vue
<Chart :pannable="true" />

renderAs?

string

Sets the preferred rendering engine (see example). If the browser does not support it, the Chart switches to the first available mode.

The supported values are:

  • "svg"—If available, renders the component as an inline .svg file.
  • "canvas"—If available, renders the component as a canvas element.
Example:
vue
<Chart :render-as="'canvas'" />

Sets the default colors of the Chart series. When the Chart uses all colors, it starts again from the first color.

Example:
vue
<Chart :series-colors="['#ff6358', '#ffd246', '#28b4c8']" />

Overrides the default options of the Chart series.

Example:
vue
<Chart :series-defaults="{ type: 'line' }" />

Sets whether the Chart plays animations when it shows the series. By default, the Chart plays animations.

Default:

true

Example:
vue
<Chart :transitions="false" />

type?

string

Sets the type of the default Sparkline series. The Sparkline ignores it when you set series.

Example:
vue
<Sparkline :type="'column'" :data-items="[10, 20, 15, 30]" />

Sets whether you can zoom the Chart (see example).

Example:
vue
<Chart :zoomable="true" />