ClickSeries event

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
SPS
Newbie
Newbie
Posts: 18
Joined: Wed Jun 29, 2005 4:00 am

ClickSeries event

Post by SPS » Tue May 12, 2009 12:33 pm

Hi,

I'm trying to get the correct index value of the serie that is clicked at a specific point. But when i use the valueIndex of the clickseries event it doesn't seem to give the correct index value when the serie contains values close to each other (for example if the serie is almost a straight line).

Is there a solution for this problem?

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Tue May 12, 2009 2:11 pm

Hi SPS,

I'm not able to reproduce the problem here with the following code. Could you please modify it in order to reproduce it? Or could you please send us a simple example project we can run as-is to reproduce the issue here.
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Code: Select all

        Line line1, line2, line3;

        private void InitializeChart()
        {
            chartController1.Chart = tChart1;

            tChart1.Aspect.View3D = false;

            line1 = new Line(tChart1.Chart);
            line1.FillSampleValues(25);
            line1.Marks.Visible = true;
            line1.Marks.Style = MarksStyles.PointIndex;
            line1.Pointer.Visible = true;
            line2 = new Line(tChart1.Chart);
            line2.FillSampleValues(25);
            line2.Marks.Visible = true;
            line2.Marks.Style = MarksStyles.PointIndex;
            line2.Pointer.Visible = true;
            line3 = new Line(tChart1.Chart);
            line3.FillSampleValues(25);
            line3.Marks.Visible = true;
            line3.Marks.Style = MarksStyles.PointIndex;
            line3.Pointer.Visible = true;

            tChart1.ClickSeries += new Steema.TeeChart.TChart.SeriesEventHandler(tChart1_ClickSeries);
        }

        void tChart1_ClickSeries(object sender, Series s, int valueIndex, MouseEventArgs e)
        {
            tChart1.Header.Text = valueIndex.ToString();
        }  
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

SPS
Newbie
Newbie
Posts: 18
Joined: Wed Jun 29, 2005 4:00 am

Post by SPS » Tue May 12, 2009 3:34 pm

I have found the problem, thanks for the sample code.

Post Reply