score:0

angular-chartjs uses chart-options from chartjs option configuration. set backgroundcolor within options.

source: https://github.com/jtblin/angular-chart.js

score:0

try adding colors like this it should work:

rgba(170, 25, 33, 1)

score:3

you need to declare the full color object if you want to play with opacity. you can use hex or rgba

html:

<canvas class="chart chart-bar" 
    chart-data="data" 
    chart-labels="labels"
    chart-options="options" 
    chart-series="series"
    chart-colors="colors"></canvas>

js:

$scope.comparechart.colors = [
    {
        backgroundcolor: '#b3e7fb',
        bordercolor: '#b3e7fb',
        hoverbackgroundcolor: '#b3e7fb',
        hoverbordercolor: '#b3e7fb'
    }
];

see https://github.com/jtblin/angular-chart.js/issues/131


Related Query

More Query from same tag