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
No Color
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
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.
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.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Figured it out
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.
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.