score:1

you can not do it that way. here in the documentation there are some examples

one of the simple ways to set the data for a chart can be done that way:

data: {
        labels: ['finance', 'technique'],
        datasets: [{
            data: [1, 2],
            backgroundcolor: [
                'rgba(255, 99, 132, 0.2)',
                'rgba(54, 162, 235, 0.2)'
            ],
            bordercolor: [
                'rgba(255, 99, 132, 1)',
                'rgba(54, 162, 235, 1)'
            ],
            borderwidth: 1
        }]
    },

working fiddle example


Related Query

More Query from same tag