• This function creates a new Chart.js chart. If a chart already exists, it is destroyed before a new one is created.

    Parameters

    • type: any

      The type of chart to create (e.g., 'line', 'bar', 'pie').

    • data: any

      The data for the chart, which should be an array of objects.

    • label: any

      The label/s for the data.

    • title: any

      The title of the chart.

    • scaleOptions: any = null

      The scape options for the chart.

    • zoomOptions: any = null

      The zoom options for the chart.

    • annotationOptions: any = null
    • subtitle: any = null

    Returns void

    Example

    // 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