ChartJsView

Label: :IA_Function
Property: type: ChartJsView
Inherits from: Function and View

The ChartJsView Function renders a ChartJs with data.

Function parameters

Key Description Default value Possible values
chartType The type of chart gauge or one of the ChartJs types
data Data to use in the chart Array of objects
options Options to customize the charts. ChartJs options.
options.plugins.annotation Chart.js plugin that draws lines and boxes on the chart area. ChartJs annotation plugin.
options.plugins.datalables Chart.js plugin that adds (value) labels to chart elements ChartJs datalables plugin.
options.plugins.datalabels.display Should display datalables. This is the only option that is changed from the original default state. false Boolean, String or Function see docs

Outgoing triggers

Type: click

Occurrence: When the user selects a selectable item in the chart (depending on the chart type).

Additional event properties (besides the inherited properties):

Key Description Possible values
data Row data of the clicked element. object

* Example click data (for two datasets):

{
    companyA: {x: 3, y: 5.6, label: 'Company A'},
    companyB: {x: 3, y: 7.5, label: 'Company B'}
}