Series overlap.

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Chris.CHWU
Newbie
Newbie
Posts: 57
Joined: Wed Jan 30, 2008 12:00 am

Series overlap.

Post by Chris.CHWU » Mon Aug 04, 2008 8:43 am

Hi,
When I add two series to the chart. The series overlap.

Now, the top series is the second series,but,

I want the top series is the first series.

Have any method to change the order of series?

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Re: Series overlap.

Post by Christopher » Mon Aug 04, 2008 9:25 am

Hello Chris.CHWU,
Chris.CHWU wrote: When I add two series to the chart. The series overlap.

Now, the top series is the second series,but,

I want the top series is the first series.

Have any method to change the order of series?
Sure, you can use the Exchange() method, e.g.

Code: Select all

    public Form3()
    {
      InitializeComponent();
      InitializeChart();
    }

    private void InitializeChart()
    {
      tChart1.Series.Add(typeof(Line));
      tChart1.Series.Add(typeof(Bar));

      tChart1[0].FillSampleValues();
      tChart1[1].FillSampleValues();
    }

    private void button1_Click(object sender, EventArgs e)
    {
      tChart1.Series.Exchange(0, 1);
    }
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Post Reply