How to place CursorTool in a speifeid X Axis date.

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
vijay
Newbie
Newbie
Posts: 42
Joined: Thu Jul 31, 2008 12:00 am
Contact:

How to place CursorTool in a speifeid X Axis date.

Post by vijay » Fri Dec 19, 2008 11:48 am

Hello,
I am using Tchart Wpf.
I am plotting values against datetime.
I want to place a CursorTool in a specified X axis value (Datetime).
I tried something like.
cursorTool.XValue = DateTime.Now.ToOADate(); .
But it is not working.

Pls reply.

Thanks,
Vijay

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Dec 19, 2008 11:55 am

Hi Vijay,

You should do:

Code: Select all

cursorTool.XValue = DateTime.Now.ToOADate();
cursorTool.YValue = YVal;
cursorTool.XValue = DateTime.Now.ToOADate();
As I explained on this thread.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

vijay
Newbie
Newbie
Posts: 42
Joined: Thu Jul 31, 2008 12:00 am
Contact:

Post by vijay » Fri Dec 19, 2008 12:49 pm

Thank you Narcis,
It works fine.

I have one more query related with series Marks.
Some times i may have more than 100000 points the screen. In that situation if i enable series markers then T Chart will not respond.
Is it possible to control the visibility of values marks depending on the points in the chart??

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Dec 19, 2008 1:51 pm

Hi vijay,

You can use DrawEvery:

Code: Select all

			line1.Marks.DrawEvery = 5;
You can set its value according to the number of points in the chart. You can also set Marks.Visible=false if line1.Count exceeds a certain value.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

vijay
Newbie
Newbie
Posts: 42
Joined: Thu Jul 31, 2008 12:00 am
Contact:

Post by vijay » Mon Dec 22, 2008 4:16 am

Thanks Narcis

Post Reply