score:0

i am not seeing anywhere in the code you posted, the mention of specifying color scheme...

per the official documentation found @ http://www.chartjs.org/docs/latest/, you need to do the following --- tweak it as needed

data: {
    labels: ["red", "blue", "yellow", "green", "purple", "orange"],
    datasets: [{
        label: '# of votes',
        data: [12, 19, 3, 5, 2, 3],
        backgroundcolor: [
            'rgba(255, 99, 132, 0.2)',
            'rgba(54, 162, 235, 0.2)',
            'rgba(255, 206, 86, 0.2)',
            'rgba(75, 192, 192, 0.2)',
            'rgba(153, 102, 255, 0.2)',
            'rgba(255, 159, 64, 0.2)'
        ],
        bordercolor: [
            'rgba(255,99,132,1)',
            'rgba(54, 162, 235, 1)',
            'rgba(255, 206, 86, 1)',
            'rgba(75, 192, 192, 1)',
            'rgba(153, 102, 255, 1)',
            'rgba(255, 159, 64, 1)'
        ],
        borderwidth: 1
    }]
},

put the above before options: {

score:0

you can call this function which generates random colors for each bars:

 var randomcolorgenerator = function () {
           return '#' + (math.random().tostring(16) + '0000000').slice(2, 8);
        };

var barchartdata = {
               labels: ["your label sets"],
               datasets: [
                   {
                       label: "my first dataset",
                       fillcolor: randomcolorgenerator(),
                       strokecolor: randomcolorgenerator(),
                       highlightfill: randomcolorgenerator(),
                       highlightstroke: randomcolorgenerator(),
                       data: [your datasets]
                   }
               ]
           };

Related Query

More Query from same tag