4๐
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'
}
];
1๐
Try adding colors like this it should work:
rgba(170, 25, 33, 1)
- [Chartjs]-Chart.js bar chart is overflowing its containing element
- [Chartjs]-How to format x-axis time scale values in Chart.js v2
0๐
Angular-chartJS uses chart-options
from ChartJS Option Configuration. Set backgroundColor within options.
Source:stackexchange.com