Bar series Clicked strange behavior

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
bairog
Newbie
Newbie
Posts: 52
Joined: Fri Dec 07, 2018 12:00 am

Bar series Clicked strange behavior

Post by bairog » Thu Aug 08, 2019 8:07 am

Hello.
I have a teeChart .NET Professional 2018.12.17 and my goal is to show a tooltip with point index when cursor hovers above bar point (and to hide it when cursor is not above any bar point, i.e. cursor is above any empty space on chart).
I've tried the following code:

Code: Select all

private void bar1_MouseEnter(object sender, System.EventArgs e)
{
     var client = tChart1.PointToClient(MousePosition);
     toolTip1.SetToolTip(tChart1, bar1.Clicked(client.X, client.Y).ToString());
     toolTip1.Active = true;
}

private void bar1_MouseLeave(object sender, System.EventArgs e)
{
     toolTip1.Active = false;
}
Alternatively I've tried the following code:

Code: Select all

private void tChart1_MouseMove(object sender, MouseEventArgs e)
{            
     var clickedPointIndex = bar1.Clicked(e.X, e.Y);

     if (clickedPointIndex != -1)
     {
          if (!toolTip1.Active)
          {
               toolTip1.SetToolTip(tChart1, clickedPointIndex.ToString());
               toolTip1.Active = true;
          }
     }
     else
          toolTip1.Active = false;
}
With both I have strange behavior:
1) Chart thinks that bar point is clicked (MouseEnter fires) when cursor is in space between two points:
ImageImage
When cursor is above or below bar point - chart correctly thinks that that point is not clicked (MouseLeave fires).

2) If cursor touches for example point #2 and than is moved to point #1 - chart thinks that point #2 is clicked:
ImageImage
Looks like this behavoir is beacuse of 1) - clicked point no is not dropped when cursor is in space between points

So why is it working that way (from my point of view it looks like a bug)?
How can I make it work like I want?

I've uploaded sample application here

Christopher
Guru
Posts: 1184
Joined: Fri Nov 15, 2002 12:00 am

Re: Bar series Clicked strange behavior

Post by Christopher » Thu Aug 08, 2019 9:31 am

Hello,

we're looking at this issue now for you and will respond to it very shortly.
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Christopher
Guru
Posts: 1184
Joined: Fri Nov 15, 2002 12:00 am

Re: Bar series Clicked strange behavior

Post by Christopher » Thu Aug 08, 2019 11:14 am

Christopher wrote:
Thu Aug 08, 2019 9:31 am
we're looking at this issue now for you and will respond to it very shortly.
We've identified the problem and have specified it in the ticket id=2221 - as you can see, this ticket has already been fixed. We have created a new build for TeeChart.NET Pro and have uploaded it to NuGet - the new build is Steema.TeeChart.NET 4.2019.8.8 and you should see it here within the next hour or so as the NuGet site updates.
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

bairog
Newbie
Newbie
Posts: 52
Joined: Fri Dec 07, 2018 12:00 am

Re: Bar series Clicked strange behavior

Post by bairog » Thu Aug 08, 2019 12:45 pm

Christopher wrote:
Thu Aug 08, 2019 11:14 am
We have created a new build for TeeChart.NET Pro and have uploaded it to NuGet - the new build is Steema.TeeChart.NET 4.2019.8.8 and you should see it here within the next hour or so as the NuGet site updates.
With version 4.2019.8.8 it works as expected, thank you.

Christopher
Guru
Posts: 1184
Joined: Fri Nov 15, 2002 12:00 am

Re: Bar series Clicked strange behavior

Post by Christopher » Thu Aug 08, 2019 1:50 pm

bairog wrote:
Thu Aug 08, 2019 12:45 pm
With version 4.2019.8.8 it works as expected, thank you.
You're welcome, we're very glad to hear it.
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Post Reply