display pointer at front

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
lilo
Newbie
Newbie
Posts: 61
Joined: Thu Sep 23, 2010 12:00 am

display pointer at front

Post by lilo » Sun Nov 14, 2010 5:35 am

I need to display the currently selected pointer on a chart at the front. Currently, if I select and highlight a pointer, it is displayed in the position plotted, making it obscured by overlying pointers.

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

Re: display pointer at front

Post by Sandra » Mon Nov 15, 2010 10:20 am

Hello lilo,
I think you can use method Exchange() of series, for change their order and show first, series you have selected. You can do something as next example:

Code: Select all

tChart1.Aspect.View3D = false;
            tChart1.Dock = DockStyle.Fill;

            for (int i = 0; i < 5; i++)
            {
                Steema.TeeChart.Styles.Points series1 = new Steema.TeeChart.Styles.Points(tChart1.Chart);
                series1.FillSampleValues(10);
                series1.Pointer.HorizSize = 7;
                series1.Pointer.VertSize = 7;
                
            }
            tChart1.ClickSeries += new Steema.TeeChart.TChart.SeriesEventHandler(tChart1_ClickSeries);
        }

          void tChart1_ClickSeries(object sender, Steema.TeeChart.Styles.Series s, int valueIndex, MouseEventArgs e)
        {
            int firts = 0;
            if (s.Clicked(e.X, e.Y) != -1)
            {
                tChart1.Series.Exchange(firts,tChart1.Series.IndexOf(s));
                 firts= tChart1.Series.IndexOf(s);
            }
        
        }

Please, check if previous code works as you want. If you have some problems about this code please let me know.

I hope will helps.

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