Hi,
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?
Regards
Marius
Yes, that should be possible after opening the connection to the database:
// open connection (ADO sample with mdb database)
ADOTable1.Active := true;
AdvChartView.BeginUpdate;
//change colors for serie 0
for I := 0 to Length(Series[0].Points) - 1 do
begin
AdvChartView.Panes[0].Series[0].Points.Color := RGB(Random(255), Random(255), Random(255));
end;
AdvChartView.EndUpdate;
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.
Regards
Marius
I stumbled to the same problem.
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,
Pieter