angularchart.js stacked bar chart colors

214 views Asked by At

I'm working with an elementary example of stacked bar chart. I would like to define a different color for every series (apple, banana, ...). However when I try to set chart-colors=["#aaa","#bbb",...] I get random colors as result.

Here is my example:

http://plnkr.co/edit/NWKM85zV5wgwtHu17gtX?p=preview

1

There are 1 answers

0
Zdenek On

After debuging the angular-chart.js I figured out that all the colors are converted to RGB representation in function hexToRgb(hex) and this function does not support short HEX format #FFF but rather long #FFFFFF

Following code worked well

chart-colors="['#ffffff', '#ff0000', '#00ff00', '#0000ff']"