Page 1 of 1

HOW CAN WE CHANGE THE POSITION OF SERIES DURING RUN TIME

Posted: Wed Jul 05, 2006 1:18 pm
by 6925851
For example i have drawn the chart with 3 series a, b,c

plotted series position are a,b,c using advance graph functionality i change the position b to c now the position are a,c ,b

how can this be achieved using the code ...

pls advise me
aravind

Posted: Wed Jul 05, 2006 2:37 pm
by narcis
Hi Aravind,

Use ExchangeSeries(Series1, Series2: Integer) method. This method changes the Series order, swapping one Series Z position with another. The Chart repaints to reflect the new Series order. It accesses TChart.SeriesList property. Example:

Code: Select all

Private Sub Command1_Click()
    TChart1.ExchangeSeries 0, 1
End Sub