Colors in Pie Chart

How do I change the colors in a Pie Chart that does not have the data displayed as a series? I have tried the solution from the “Re: Dashboard Designer Styling” post and the Theme Builder but it doesn’t work.

Thank you for the help.

Simplest thing to do is add a column called ‘color’ and put the values in there manually, e.g. ‘red’, ‘black’, ‘#90cc38’. Be sure to tick the column in Data Source -> SharePoint list and click Process. Otherwise can add the color field programmatically, e.g. via Dashboard -> Advanced:

var handlers = {}; handlers.preRender = function(config, logger) { logger.debug('Configuration: ', config); $.each(config.series[0].data, function(i){ if (i === 0) { this.color = 'red'; } else { this.color = 'black'; } }); return true; }

1 Like

I tried the first approach since the color must follow the specific column value, but was unsuccessful.

I added the new color column as a Single Line of Text column and then entered each color I would like associated with the items. I then went to the chart, selected the new color column and clicked Process. I also clicked Process/Preview on the other tabs as well.

Please see attached image


Since you’re using aggregation you’ll need to add the color field via aggregation. Go to Data Source -> Aggregation, click + -> add ‘color’ = min of color. That should do it.

This worked! What a great trick.

Thank you