Page 1 of 1

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

Posted: Wed Jun 05, 2013 5:15 am
by 16565303
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

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

Posted: Wed Jun 05, 2013 11:17 am
by yeray
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.