Changing Series Color on DBChart (Pie)

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Bone
Newbie
Newbie
Posts: 2
Joined: Fri Nov 15, 2002 12:00 am

Changing Series Color on DBChart (Pie)

Post by Bone » Sun Aug 01, 2004 9:44 pm

I am using a Pie DBChart. I have selected the two fields in my defined datasource. I want to change the color of the slices, but cannot figure out how to do so. Appreciated in advance.

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Mon Aug 02, 2004 7:46 am

Hi.

You want to change the color of individual slices *after* you've connected it to the color field in database ? This can be done by accessing individual point color. The following code should do the trick:

Code: Select all

pie1.ValueColor[2] := clWhite; // 3rd slice color = white
Marjan Slatinek,
http://www.steema.com

Bone
Newbie
Newbie
Posts: 2
Joined: Fri Nov 15, 2002 12:00 am

Post by Bone » Tue Aug 03, 2004 2:19 pm

What do you mean "You want to change the color of individual slices *after* you've connected it to the color field in database ?"

Pep
Site Admin
Site Admin
Posts: 3298
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Wed Aug 04, 2004 9:02 am

Hi Bone,

he means that if you want to change the color of individual slices after you've set or asigned a DataSource you must use the code he show you.

Post Reply