Hi,
I have contour displayed.
Requirement is that When ever user performs mouse hoover over contour line, Mouse should change to some business icon.
Problem is that T chart is not giving any event like mouse enter or mouse leave on the Contour segments/levels.
Please tell me how to achieve that .
Rajesh Dhiman
Mouse On Contour Line
Re: Mouse On Contour Line
Hi Rajesh Dhiman,
Is the following achieving what you are trying to do?
Is the following achieving what you are trying to do?
Code: Select all
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
Steema.TeeChart.Styles.Contour contour = new Steema.TeeChart.Styles.Contour(tChart1.Chart);
contour.FillSampleValues();
tChart1.MouseMove += new MouseEventHandler(tChart1_MouseMove);
}
void tChart1_MouseMove(object sender, MouseEventArgs e)
{
int index = tChart1[0].Clicked(e.X, e.Y);
tChart1.Header.Text = (index > -1) ? index.ToString() : "TeeChart";
}
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 15
- Joined: Mon Sep 15, 2008 12:00 am
Re: Mouse On Contour Line
HI Yeray,
Thanks for your reply,
Here is the bug in TChart. Clicked Method always return -1 irrespective of the mouse position.
Even mouse pointer is over the contour line it returns -1. I tried with zoomed data also, result is same.
Please confirm that and let me know where to change in Tchart code as well.
Below is the code snippet I used
.
private void tChart_MouseMove(object sender, MouseEventArgs e)
{
int index = tChart[0].Clicked(e.GetPosition(tChart).X, e.GetPosition(tChart ).Y);
tChart.Header.Text = index.ToString();
}
Thanks for your reply,
Here is the bug in TChart. Clicked Method always return -1 irrespective of the mouse position.
Even mouse pointer is over the contour line it returns -1. I tried with zoomed data also, result is same.
Please confirm that and let me know where to change in Tchart code as well.
Below is the code snippet I used
.
private void tChart_MouseMove(object sender, MouseEventArgs e)
{
int index = tChart[0].Clicked(e.GetPosition(tChart).X, e.GetPosition(tChart ).Y);
tChart.Header.Text = index.ToString();
}
Re: Mouse On Contour Line
Hi Rajesh Dhiman,
Could you please tell us what exact TeeChart version and IDE are you using?
I've added to the wish list to study the possibility for the clicked method to give the level "zone", not only the line (TF02014905).
Could you please tell us what exact TeeChart version and IDE are you using?
I've added to the wish list to study the possibility for the clicked method to give the level "zone", not only the line (TF02014905).
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 15
- Joined: Mon Sep 15, 2008 12:00 am
Re: Mouse On Contour Line
Release Notes 24th September 2009
TeeChart.NET version 2009
Build 4.0.2009.35592
Compiled for Visual Studio 2008
Build 4.0.2009.35591
Compiled in .NET Framework 2.0
Build 4.0.2009.35590
Compiled in .NET Framework 1.0
IDE--> MS-VS2008
TeeChart.NET version 2009
Build 4.0.2009.35592
Compiled for Visual Studio 2008
Build 4.0.2009.35591
Compiled in .NET Framework 2.0
Build 4.0.2009.35590
Compiled in .NET Framework 1.0
IDE--> MS-VS2008
Re: Mouse On Contour Line
Hi Rajesh Dhiman,
Have you tried the example code I posted above in a new simple VS2008 C# WinForms application?
Here it works fine with TeeChart for .NET v4.0.2009.35592.
On the other hand, I'd recommend you to upgrade your TeeChart for .NET to the latest maintenance release available at the client area
Have you tried the example code I posted above in a new simple VS2008 C# WinForms application?
Here it works fine with TeeChart for .NET v4.0.2009.35592.
On the other hand, I'd recommend you to upgrade your TeeChart for .NET to the latest maintenance release available at the client area
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 15
- Joined: Mon Sep 15, 2008 12:00 am
Re: Mouse On Contour Line
Hi Yeray.
We are creating WPF application not the Win-Form Application.
It will be great if you check for WPF appplication as well.
Regards,
Rajesh Dhiman
We are creating WPF application not the Win-Form Application.
It will be great if you check for WPF appplication as well.
Regards,
Rajesh Dhiman
Re: Mouse On Contour Line
Hi Rajesh Dhiman,
Yes, I've seen that the same code works fine with WinForms while in WPF doesn't return the correct index, so I've added it to the defect list to be fixed in future releases (TW16014909).
Yes, I've seen that the same code works fine with WinForms while in WPF doesn't return the correct index, so I've added it to the defect list to be fixed in future releases (TW16014909).
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |