Page 1 of 1

Find out Series index on Teechart MouseMove event

Posted: Mon Feb 02, 2009 8:13 am
by 13046610
I have chart with Multiple series. Inside MouseMove eventHandler of TeeChart, How to find the series index on which mouse pointer is placed?

Regards,
Priya

Posted: Mon Feb 02, 2009 9:57 am
by 10050769
Hi Anil Kumar!

We propose the following code for find your index series:

Code: Select all

        private void tChart1_MouseMove(object sender, MouseEventArgs e)
        {
           
            for(int i=0; i<tChart1.Series.Count;++i)
            {
                int tmp = tChart1.Series[i].Clicked(e.X, e.Y);
                if (tmp != -1)
                {
                    tChart1.Header.Text = "Series: " + i.ToString() + " Point: " + tmp.ToString();
                }

            }
            
}


Best Regards
Sandra Pazos


Steema Support Central
http://support.steema.com

Posted: Wed Feb 04, 2009 8:12 am
by 13046610
Thanks, Sandra.