Point control selection problem

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
vivek
Newbie
Newbie
Posts: 40
Joined: Thu Jul 19, 2007 12:00 am

Point control selection problem

Post by vivek » Tue Nov 10, 2009 6:36 am

Hello,

I have developed point selection in TChart V3(Dll version is 3.5.3425.20244), it was working fine.
Now i have installed TeeChartNET2009VSNET2005 . Dll version is 4.0.2009.28593
I am facing selection problem with Point series.

I have added Point series and MarksTip tool in TChart control.
Then have added 3 or 4 same data inputs in the point series. If i move mouse on top of those points, it is showing above/top lable. But if i try to get the lable/valueIndex of selected points after clicking on series, its giving the below/bottom point's lable instead of above/top point's lable.

example,

points1.Add(5, 10, "A");
points1.Add(5, 10, "B");
points1.Add(5, 10, "C");

private void tChart1_ClickSeries(object sender, Steema.TeeChart.Styles.Series s, int valueIndex, MouseEventArgs e)
{
//tChart1.Header.Text = points1[valueIndex].Label;
if (points1[valueIndex].Color == selectedCellColor)
points1[valueIndex].Color = Color.Black;
else
points1[valueIndex].Color = selectedCellColor;
}

The above code working fine in TChart dll 3.5.3425.20244. But it is not working in TChart dll 4.0.2009.28593.
How to solve this problem?

With Regards,
Vivek

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

Re: Point control selection problem

Post by Sandra » Thu Nov 12, 2009 10:08 am

Hello vivek,

Thanks for your information, I could reproduce your problem here. I have added it in bug report list with number [TF02014559] and we will try to fix for next versions of TeeChart .Net



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

vivek
Newbie
Newbie
Posts: 40
Joined: Thu Jul 19, 2007 12:00 am

Re: Point control selection problem

Post by vivek » Thu Nov 12, 2009 10:19 am

Hello sandra,

Do you have any temporary solution to solve this problem?

With regards,
Vivek.J

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

Re: Point control selection problem

Post by Yeray » Thu Nov 12, 2009 11:10 am

Hi Vivek,

I'm afraid that the only thing I can think right now would be looping into your series searching for all the points in the same position. Something like following:

Code: Select all

        private Steema.TeeChart.Styles.Points points1;
        private Steema.TeeChart.Tools.MarksTip marktip;        
        
        private void InitializeChart()
        {
            tChart1.Aspect.View3D = false;

            points1 = new Steema.TeeChart.Styles.Points(tChart1.Chart);
            marktip = new Steema.TeeChart.Tools.MarksTip(tChart1.Chart);
            points1.Add(5, 10, "A");
            points1.Add(5, 10, "B");
            points1.Add(5, 10, "C");
            marktip.Series = points1;
            tChart1.ClickSeries += new Steema.TeeChart.TChart.SeriesEventHandler(tChart1_ClickSeries);
        }

        void tChart1_ClickSeries(object sender, Steema.TeeChart.Styles.Series s, int valueIndex, MouseEventArgs e)
        {
            int first, last;
            first = last = -1;
            for (int i = 0; i < tChart1[0].Count; i++)
            {
                if ((tChart1[0].XValues[i] == tChart1[0].XValues[valueIndex]) && (tChart1[0].YValues[i] == tChart1[0].YValues[valueIndex]))
                {
                    if (first == -1) first = i;
                    last = i;
                }
            }
            if ((first != -1) && (last != -1))
                tChart1.Header.Text = "first: " + tChart1[0].Labels[first] + "  last: " + tChart1[0].Labels[last];
        } 
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

Post Reply