Page 1 of 1

TeeChart 7.12 - order

Posted: Wed Jun 04, 2008 3:20 pm
by 9349859
Hi All,

I have a problem with ordering TChart values (TeeChart 7.12 with Delphi 2007). I need to order yvalues in a horizontal bar chart, and writed the code below:

chart.Series.YValues.Order := loDescending;

It won't work. Nothing happens. I tried to refresh chart and series as well, no use. Sorting by labels works good though.

What can be the problem, how can I make that sort work?
Any help would be appreciated.


Thanks,

Toto

Posted: Thu Jun 05, 2008 7:14 am
by narcis
Hi Toto,

You should ValueLists order before populating series. Are you using it this way?

Thanks in advance.

TeeChart 7.12 - order

Posted: Thu Jun 05, 2008 12:20 pm
by 9349859
Hi NarcĂ­s,

I am afraid don't really know what you mean. But guess you mean I should set valuelist order, before fill the series, don't you.

It works only once. Doesn't matter if I fill the series data and set order or set order first then fill data. It works.

But: I need to do this ordering by checking some radio buttons on the client side without refreshing data from the database (means I don't want to clear series values and add them again). That's the real problem.

The user can play with this radio buttons (ASC/DESC) and the chart should have to refresh its values each time according to the last order that was set. So in these cases the order property changes, but nothing happens beyond that. The chart look does not change.

Any idea?

Posted: Thu Jun 05, 2008 1:11 pm
by narcis
Hi Toto,
I am afraid don't really know what you mean. But guess you mean I should set valuelist order, before fill the series, don't you.


Yes, exactly. That's what I meant.
The user can play with this radio buttons (ASC/DESC) and the chart should have to refresh its values each time according to the last order that was set. So in these cases the order property changes, but nothing happens beyond that. The chart look does not change.
In that case you may need to use Sort and FillSequence methods as in the examples Marjan posted here.