Running datetime values with mousemove

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Hans
Newbie
Newbie
Posts: 28
Joined: Mon Jan 03, 2005 5:00 am

Running datetime values with mousemove

Post by Hans » Mon May 16, 2005 3:32 pm

How can I get the datetimevalues with moving mouse in the chart.

I was used to this by:

Series1.GetCursorValues(CX,CY);
Decodedatetime(CX,year,month,day,Hour, Min, Sec, MSec);

But how to do this in dotnet?

Hans

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Tue May 17, 2005 7:10 am

Hi, Hans.

In .NET, you have to use slightly different approach:

Code: Select all

double CX = ...

System.DateTime dt = DateTime.FromOADate(CX);
// access dt properties for year, month, etc...
Marjan Slatinek,
http://www.steema.com

Hans
Newbie
Newbie
Posts: 28
Joined: Mon Jan 03, 2005 5:00 am

Post by Hans » Tue May 17, 2005 10:12 am

Marjan,

What is .... in CX=.... ?

That's the most important part for me.

Thanks,
Hans

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Tue May 17, 2005 12:29 pm

Hi.

That's easy (check TeeChart tutorials and demo for an example):

Code: Select all

double CX = Series1.GetHorizAxis.CalcPosPoint(mousexposition);
double CY = Series1.GetVertAxis.CalcPosPoint(mouseyposition);
where mousexposition and mouseyposition are cursor current screen x and y values (integers).
Marjan Slatinek,
http://www.steema.com

Post Reply