Hello,
Is there any way to get the time span between two Vertical CursorTools.
Do do i need to make use of the DrawlineTool for such kind of support.
Thanks,
Vijaylal.
How to Display time variation between two CursorTools
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Vijaylal,
Yes, you can do something like this:
Yes, you can do something like this:
Code: Select all
TimeSpan timeDifference = DateTime.FromOADate(cursor1.XValue) - DateTime.FromOADate(cursor2.XValue);
int total = (timeDifference.Seconds * 1000) + timeDifference.Milliseconds;
label1.Text = "Difference: " + total.ToString() + " ms";
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Vijaylal,
You can use a line series for that, for example:
You can use a line series for that, for example:
Code: Select all
Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
double midPoint = tChart1.Axes.Left.Minimum + (tChart1.Axes.Left.Maximum - tChart1.Axes.Left.Minimum) / 2;
line1.Add(cursor1.XValue, midPoint);
line1.Add(cursor2.XValue, midPoint);
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 Narcís.
This works fine. But i found some difficulties in using a line between two vertical cursorTools.
1.I cannot reposition it.
2.I Cant apply Dash style etc...
Is there any way to place a horizontal CursorTool between those vertical cursortools ?. So that i could drag and reposition it to display 'y' value variations.
Thanks,
Vijay.
This works fine. But i found some difficulties in using a line between two vertical cursorTools.
1.I cannot reposition it.
2.I Cant apply Dash style etc...
Is there any way to place a horizontal CursorTool between those vertical cursortools ?. So that i could drag and reposition it to display 'y' value variations.
Thanks,
Vijay.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Vijay,
Anyway, you can do the same with canvas' pen.
You could repopulate line series every time cursor's Change event is fired. However, I recommend you to do something as in the All Features\Welcome !\Chart styles\Standard\Line(Strip)\Interpolating line series example at the features demo available at TeeChar'ts program group. Instead of drawing circles you could draw a line from one cursor position to the other.1.I cannot reposition it.
Yes, this possible with line series:2.I Cant apply Dash style etc...
Code: Select all
line1.LinePen.Style = System.Drawing.Drawing2D.DashStyle.Dash;
Yes, you could do that following the same principles in the example I pointed you.Is there any way to place a horizontal CursorTool between those vertical cursortools ?. So that i could drag and reposition it to display 'y' value variations.
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 |