Different Color Pie Slices


Is there a way that I can setup a DBAdvChart to automatically assign a different color to each slice in the pie, instead of having gradients of one color?


Yes, that should be possible after opening the connection to the database:

    // open connection (ADO sample with mdb database)
    ADOTable1.Active := true;


//change colors for serie 0
    for I := 0 to Length(Series[0].Points) - 1 do
      AdvChartView.Panes[0].Series[0].Points.Color := RGB(Random(255), Random(255), Random(255));


Kind Regards, 
Scheldeman Pieter

Pieter Scheldeman2011-10-07 02:49:19

Hi Pieter,

Fantastic, I will give it a try and report back.

Thank you very much for your response.


I stumbled to the same problem.

Just my 0.02 euros, but I think that this should be automatic feature. If someone needs to have specific colors , then he can overwrite it, but by default the main colors should be used for every slice.

We have decided to implement a variant of the main color for each slice. If each slice would have the main color then you would not see the difference between slice 1 and slice 2. As currently implemented the difference is a darker tone of the main color, if you need a different color then you can use the approach explained in the posts above.

Kind Regards,