score:9

you have to create the array's, populate them, and only type the array name inside object without needing to surround it with [ and ]

example:

var description = new array();
description.push('a');
description.push('b');
var myvalues = new array();
myvalues.push('c');
myvalues.push('d');
var barchartdata = {
            labels: description,
            datasets: [
                {
                    fillcolor: "rgba(220,220,220,0.5)",
                    strokecolor: "rgba(220,220,220,1)",
                    scaleoverride: true,
                    scalesteps: 100,
                    stepvalue: 1,
                    barshowstroke: false,
                    data: myvalues
                },
                {
                    fillcolor: "rgba(151,187,205,0.5)",
                    strokecolor: "rgba(151,187,205,1)",
                    scaleoverride: true,
                    scalesteps: 100,
                    barshowstroke: false,
                    stepvalue: 1,
                    data: myvalues
                }
            ]

        }

Related Query

More Query from same tag