Vue component for rendering a chart using Chart.js library.
Properties:
Name | Type | Description |
---|---|---|
chartData |
Object | The data object for the chart. |
chartOptions |
Object | The options object for the chart. |
type |
String | The type of chart to render. |
- Source:
Example
<chart :chart-data="data" :chart-options="options" type="line"></chart>
Methods
(function) afterDatasetsDraw(chart)
Hook that is called after datasets are drawn. Draws annotations.
Parameters:
Name | Type | Description |
---|---|---|
chart |
Object | The chart object. |
- Source:
(function) afterInit(chart)
Hook that is called after the chart is initialized.
Parameters:
Name | Type | Description |
---|---|---|
chart |
Object | The chart object. |
- Source:
(function) calcIndexGE(array, value) → {number}
Calculates the index greater than or equal to the given value in the specified array.
Parameters:
Name | Type | Description |
---|---|---|
array |
Array | The array to search in. |
value |
number | The value to compare against. |
- Source:
Returns:
- The index of the first element in the array that is greater than or equal to the given value.
- Type
- number
(function) beforeDestroy()
Method beforeDestroy
- Source:
(function) data()
Method data
- Source:
(method) renderChart()
Renders the chart.
- Source:
(function) mounted()
Method mounted
- Source:
(function) unmounted()
Method unmounted
- Source: