No Color

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
GCole
Newbie
Newbie
Posts: 5
Joined: Thu Feb 23, 2006 12:00 am

No Color

Post by GCole » Thu Mar 23, 2006 12:43 am

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Mar 23, 2006 8:44 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

GCole
Newbie
Newbie
Posts: 5
Joined: Thu Feb 23, 2006 12:00 am

well....

Post by GCole » Thu Mar 23, 2006 5:02 pm

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....

GCole
Newbie
Newbie
Posts: 5
Joined: Thu Feb 23, 2006 12:00 am

Figured it out

Post by GCole » Thu Mar 23, 2006 11:05 pm

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.

Post Reply