Page 1 of 1
How to set the order of series in code?
Posted: Wed Jun 23, 2004 5:07 pm
by 5893473
I know how to open the Editor and on the Series page, move series' up/down. However, I would like to do this in code. How is this possible? We are using version 5.02.
Thanks.
SMP
Posted: Wed Jun 23, 2004 9:00 pm
by Marjan
Hi.
Sure, it can be done at runtime via code. To swap two series in chart series list, you can use the following code:
Code: Select all
// exchange 3rd and 1st series
Chart1.ExchangeSeries(1,3);
Alternatively you can also use chart SeriesUp and SeriesDown method to scroll series up or down in the series list:
Code: Select all
Chart1.SeriesUp(Series2); // move series2 up 1 place
// assumption : index of series2 is > 1