Page 1 of 1
Running datetime values with mousemove
Posted: Mon May 16, 2005 3:32 pm
by 9340459
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
Posted: Tue May 17, 2005 7:10 am
by Marjan
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...
Posted: Tue May 17, 2005 10:12 am
by 9340459
Marjan,
What is .... in CX=.... ?
That's the most important part for me.
Thanks,
Hans
Posted: Tue May 17, 2005 12:29 pm
by Marjan
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).