Page 1 of 1

Bar series Clicked strange behavior

Posted: Thu Aug 08, 2019 8:07 am
by 15685014
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

Re: Bar series Clicked strange behavior

Posted: Thu Aug 08, 2019 9:31 am
by Christopher
Hello,

we're looking at this issue now for you and will respond to it very shortly.

Re: Bar series Clicked strange behavior

Posted: Thu Aug 08, 2019 11:14 am
by Christopher
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.

Re: Bar series Clicked strange behavior

Posted: Thu Aug 08, 2019 12:45 pm
by 15685014
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.

Re: Bar series Clicked strange behavior

Posted: Thu Aug 08, 2019 1:50 pm
by Christopher
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.