This is an urgent issue and prompt response is much appreciated.
I have X-axis to represent DateTime values and on this chart I have a cursortool. I set the cursorTool1.FollowMouse = True and defined the handler for cursorTool1.Change. When the cursorTool1.Change event is triggered, I do not get the XValue of Steema.TeeChart.Tools.CursorChangeEventArgs correctly. It gives some large value. How can i get DateTime representation of cursortool1.change event?
I uploaded a test project to show my issue. The project is named as Test-TeeChartProj-28Jan2009.zip
Cursortool with DateTime X axis
In addition to above question, I need to be able to get the Markstip tool's tooltip message with resolution of seconds. Now, when i display a 15 minute worth of data (series is populated with points at few seconds apart), all i can get from the zoom and markstip tool's tooltip is resolution of minutes. I want to know how i can get the resolution of seconds especially with marktip's tooltip and when the axis is zoomed to a resolution of seconds.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi asupriya,
For more information on how Date type works please have a look here:
http://msdn.microsoft.com/en-us/library/3eaydw6e.aspx
You need to use FromOADate method:I have X-axis to represent DateTime values and on this chart I have a cursortool. I set the cursorTool1.FollowMouse = True and defined the handler for cursorTool1.Change. When the cursorTool1.Change event is triggered, I do not get the XValue of Steema.TeeChart.Tools.CursorChangeEventArgs correctly. It gives some large value. How can i get DateTime representation of cursortool1.change event?
Code: Select all
eventLbl.Text = "e.xvalue = " & DateTime.FromOADate(e.XValue).ToString() & " e.yvalue = " & e.YValue
http://msdn.microsoft.com/en-us/library/3eaydw6e.aspx
You can do something like this:In addition to above question, I need to be able to get the Markstip tool's tooltip message with resolution of seconds. Now, when i display a 15 minute worth of data (series is populated with points at few seconds apart), all i can get from the zoom and markstip tool's tooltip is resolution of minutes. I want to know how i can get the resolution of seconds especially with marktip's tooltip and when the axis is zoomed to a resolution of seconds.
Code: Select all
MarksTip1 = New Steema.TeeChart.Tools.MarksTip(TChart1.Chart)
MarksTip1.Style = Steema.TeeChart.Styles.MarksStyles.XValue
TChart1.Axes.Bottom.Labels.DateTimeFormat = "dd/mm/yyyy hh:mm:ss"
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Thanks for the help. It worked as expected.
I have one more need. I need to synchronize cursor across a series of vertically aligned charts (all having DateTime format for Bottom axis). When i tried to set other chart's otherCharts.Tools.cursortool.xvalue = e.xvalue of the cursortool1.change event's CursorChangeEventArgs, its not working (but not giving any error either).
Can you please suggest some solution? (You can see this in the test project i uploaded yesterday. You need to simply uncomment the part of code that creates as many charts as the panels in the form.)
I have one more need. I need to synchronize cursor across a series of vertically aligned charts (all having DateTime format for Bottom axis). When i tried to set other chart's otherCharts.Tools.cursortool.xvalue = e.xvalue of the cursortool1.change event's CursorChangeEventArgs, its not working (but not giving any error either).
Can you please suggest some solution? (You can see this in the test project i uploaded yesterday. You need to simply uncomment the part of code that creates as many charts as the panels in the form.)
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi asupriya,
This is because bottom chart and the other charts don't have same data range and therefore same axes scales. Populating all them in the same way solves the problem. For example, populating bottom chart like this:
This is because bottom chart and the other charts don't have same data range and therefore same axes scales. Populating all them in the same way solves the problem. For example, populating bottom chart like this:
Code: Select all
For k As Integer = 0 To 100
FastLine1.Add(myDateTime.AddSeconds(k * 60), myRand.Next(5555))
Next
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |