Chartjs-ChartJS doughnut colors not showing from a Flask app. All gray

0👍

Fixed it!. datasets is a list of objects. I needed to place the backgroundColor option inside datasets as such:

datasets:
                    [{ data : [82.48309772587584, 14.935464044253226, 1.9668100799016592],
                    backgroundColor: ['rgba(0, 153, 0, 0.1)', 'rgba(0,153,153,0.1)', 'rgba(102,153,51,0.1)'],
                    fill: true
                }],

I had it outside. RTFM! lol

Leave a comment