How can I get next different color for element gantt series.

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
wiesiek
Newbie
Newbie
Posts: 1
Joined: Thu Feb 28, 2013 12:00 am

How can I get next different color for element gantt series.

Post by wiesiek » Wed Jun 05, 2013 5:15 am

Hello,
I have project which writing elements to data base and next display it on the chart as a gantt series (in short explain).

I would like write color to data base and and next it display on the chart.
So I need function which find me next color for my element when I write it do data base.

Automatically colors working ok. But when I delete or move element I see it on then chart in different color.
I need be sure that each time the same element has same color.

Best Regards
Wiesiek

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

Re: How can I get next different color for element gantt series.

Post by Yeray » Wed Jun 05, 2013 11:17 am

Hi Wiesiek,

By default, TeeChart uses the Opera palette. This means that when the color isn't explicitly defined for a point, the next color in the OperaPalette array of colors is taken.
This would explain why, when you remove a point the colors from that point are displaced a position.
You could try to add the points to the series with color (see the different Add functions).

Don't hesitate to let us know if this doesn't work fine for you.
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