Page 1 of 1
No Color
Posted: Thu Mar 23, 2006 12:43 am
by 9345409
Trying to use a Pie Chart - that I populate the series from a database at run-time. It works great except - no colors. I have read all your documentation and I can't see why the colors aren't happening automatically. Also it's not clear to me how to code this to do so. If I populate the same chart at run time myself (no TDataSet) then it colors automatically - with no additional coding.
very confused now....help
Posted: Thu Mar 23, 2006 8:44 am
by narcis
Hi GCole,
Could you please send us an example we can run "as-is" to reproduce the problem here? You can post your files at news://
www.steema.net/steema.public.attachments newsgroup.
Thanks in advance.
well....
Posted: Thu Mar 23, 2006 5:02 pm
by 9345409
The work I'm doing for my employer is proprietary- so I will have to try to boil this down to something that illustrates the problem - without giving away the company trade secrets....
Figured it out
Posted: Thu Mar 23, 2006 11:05 pm
by 9345409
Turns out when you populate the series from a dataset - the color values for each entity don't default to clTeeColor if (ColorEachPoint = TRUE) or to whatever the SeriesColor is set to otherwise - like they do normally using another method for series population.
I fixed it by doing something like this:
for i := 0 to Series1.PieValues.Count-1 do begin
Series1.ValueColor := clTeeColor;
end;
Also the call to :
Series1.CheckDataSource;
clears the ValueColor property array. I had tried numerous times to set the colors with no effect - before I discovered this. DO NOT CALL THIS METHOD after you set your colors.