Page 1 of 1

Sorting a Series.

Posted: Tue Sep 01, 2015 6:27 pm
by 16475083
Hi,

I have a series which is loaded with the top 20 (could be 30, 40, 80 or any number) sales totals in descending order. I want to be able to click a button and have it switch the display from "high to low" to "low to high" (or the other way around) without reloading the series.

I've looked through this forum and all I can find is how to sort by labels or the xlabel but not by the yvalue unless I set the new sort order and reload the series.

How do I do this without reloading the series?
.

Re: Sorting a Series.

Posted: Tue Sep 01, 2015 9:51 pm
by 16475083
Hi,

Here is what I'd like to be able to do - these 2 images:

Programatically be able to set what appears to be Series1.General.Options.Sort to "Bar Ascending" or to "Bar Descending".

How do I do that?
.

Re: Sorting a Series.

Posted: Wed Sep 02, 2015 11:12 am
by yeray
Hello,

Try with this:

Code: Select all

  Series1.YValues.Order:=loDescending; //or loAscending
  Series1.CheckOrder;