DBChart - custom colors for one series

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Cogito
Newbie
Newbie
Posts: 17
Joined: Fri Feb 06, 2009 12:00 am

DBChart - custom colors for one series

Post by Cogito » Fri May 22, 2009 7:29 am

Hello,

I'm new and not experienced with TDBChart, therefore the question might be stupid, but I've a simple bar chart with one series and want to define the first 5 colors. If the chart contains more than 5 values, the other colors doesn't play a role. Could someone tell me how to do this?

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Fri May 22, 2009 9:00 am

Hi Cogito,

Once you've added the points to the series, you could do something like this:

Code: Select all

  Series1.ValueColor[0] := clGreen;
  Series1.ValueColor[1] := clYellow;
  Series1.ValueColor[2] := clRed;
  Series1.ValueColor[3] := clWhite;
  Series1.ValueColor[4] := clMaroon;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply