Coding Reference

Props

Some basic props are defined in the components provided by vue-chartjs.

PropDescription
dataData object that is passed into the Chart.js chart
optionsOptions object that is passed into the Chart.js chart
datasetIdKeyKey name to identify the dataset
pluginsPlugins array that is passed into the Chart.js chart
updateModeMode string to indicate the transition configuration to be used.
ariaLabelAn ARIA label that describes the chart to make it accessible.
ariaDescribedbyA reference to the describing element. E. g. a table representation of the data.

The rest of the props will fall through to the canvas element.

Global Methods

Global Methods need to be imported.

createTypedChart

  • Type: Function
  • Arguments:chart-type, chart-controller
  • Usage:
import { createTypedChart } from 'vue-chartjs'
import { LineController } from 'chart.js'

const CustomLine = createTypedChart('line', LineController)