Page 1 of 1

display pointer at front

Posted: Sun Nov 14, 2010 5:35 am
by 15057312
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.

Re: display pointer at front

Posted: Mon Nov 15, 2010 10:20 am
by 10050769
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,