The type of chart to create (e.g., 'line', 'bar', 'pie').
The data for the chart, which should be an array of objects.
The label/s for the data.
The title of the chart.
The scape options for the chart.
The zoom options for the chart.
// Create a bar chart
const data = [
{
"label": "bbb",
"data": [
16912.75
],
"borderColor": "#33ef4b",
"backgroundColor": "#33ef4b"
}
];
CreateChart('bar', data, 'My Label', 'My Title');
Generated using TypeDoc
This function creates a new Chart.js chart. If a chart already exists, it is destroyed before a new one is created.