Bringing different series to front question

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
JRB
Newbie
Newbie
Posts: 3
Joined: Mon Mar 14, 2005 5:00 am

Bringing different series to front question

Post by JRB » Tue Jun 06, 2006 9:20 pm

Hi, I've got a chart that will have up to 5 different series plotted on it. How do I bring different series to the front so I can see them without being hidden behind? Thanks.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Jun 07, 2006 8:29 am

Hi JRB,

You can only change a series ZOrder using TChart.Series.Exchange(int32 series1, int32 serise2) method.

You can also set the same ZOrder for several series doing something like this:

Code: Select all

    private void Form1_Load(object sender, EventArgs e)
    {
      for (int i = 0; i < 10; i++)
      {
        Steema.TeeChart.Styles.Line line1= new Steema.TeeChart.Styles.Line(tChart1.Chart);

        line1.FillSampleValues();
        line1.ZOrder = i % 3;
      }      
    }
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

LibDundas
Newbie
Newbie
Posts: 55
Joined: Fri Mar 20, 2009 12:00 am

Re: Bringing different series to front question

Post by LibDundas » Mon Dec 07, 2009 5:24 pm

Hi, I attempted to change the ZOrder to fix the layer of my line graphs, but it doesn't appear to work properly.

Basically, when I click to focus on a specific graph, the following code is executed:

Code: Select all

                 case 0:
                    line1.ZOrder = 1;
                    line2.ZOrder = 0;
                    break;
                case 1:
                    line1.ZOrder = 0;
                    line2.ZOrder = 1;
                    break;
Is there an easier way than using the .Exchange method since I have 8 or more lines and never know what the current line order is. A simple line1.BringToFront() would be a VERY handy method.

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Bringing different series to front question

Post by Sandra » Wed Dec 09, 2009 9:38 am

Hello LibDundas,

I couldn't reproduce your problem. Please, you could send us a simple project, because we can try to solve the problem here.


Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

LibDundas
Newbie
Newbie
Posts: 55
Joined: Fri Mar 20, 2009 12:00 am

Re: Bringing different series to front question

Post by LibDundas » Wed Dec 09, 2009 2:24 pm

Hi Sandra, I uploaded a zip file (DragPoint_FlatLine.zip) on Dec 7 for some other questions I posted. In that example, when you click the "Line 1" and "Line 2" buttons, it will attempt to set the line Zorder, but you can see that the blue line never goes to the back.

Thanks!

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Bringing different series to front question

Post by Sandra » Thu Dec 10, 2009 11:17 am

Hello LibDundas,

I inform that is not possible do ZOrder using FastLine series as explain in this thread. I recommend that if you would do ZOrder use a Line Series as explain in the thread.

Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply