Page 1 of 1

Series overlap.

Posted: Mon Aug 04, 2008 8:43 am
by 14048132
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?

Re: Series overlap.

Posted: Mon Aug 04, 2008 9:25 am
by Chris
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);
    }