Greetings,
I would like to set the width of a point on a chart (realtime) where the bottom axis is datetime. I have working with tchart.series(seriesindex).CalcXSizeValue(TheValue), "TheValue" is usally seconds and it returns a huge number of pixels. Is this the right method, or do I need to convert something?
The need is to display how long something ran realative to another series of data.
Thanks!
Set width of point
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hi --
You should be able to use the OnGetSeriesPointerStyle event, e.g.
You should be able to use the OnGetSeriesPointerStyle event, e.g.
Code: Select all
Private Sub Form_Load()
Dim YValue, XValue
With TChart1
.Aspect.View3D = False
.AddSeries scPoint
.Series(0).XValues.DateTime = True
XValue = Now
For i = 0 To 10
YValue = Rnd * 10
XValue = XValue + 1
.Series(0).AddXY XValue, YValue, "", clTeeColor
Next i
End With
End Sub
Private Sub TChart1_OnGetSeriesPointerStyle(ByVal SeriesIndex As Long, ByVal ValueIndex As Long, AStyle As TeeChart.EPointerStyle)
If ValueIndex = 1 Then
TChart1.Series(0).asPoint.Pointer.HorizontalSize = 1
Else
TChart1.Series(0).asPoint.Pointer.HorizontalSize = 4
End If
End Sub
Thank you!
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Decided to use Gantt series
Christopher,
I decided to use the Gantt Series beacuse it has start and end datetime to easily plot the width. However I have found the Marks:Arrow Lengths Property do not appear to be working for the Gantt Series. I would like to be able to move Mark Text off of the Gantt Bar like you can with a line series...
Also,
I am working with streaming data (one stream per series) each stream can be a different interval (1s, 5s, 15s, etc). It appears that if I do not delete a point before it goes beyond the left wall in a 3D rotateable view, the series actually at times appears on the other (left) side of the wall. Is there a property that controls this (like clipoints). I have created a fix up for deleting points and creating new points to make an angled line appear correctly at the point of the left wall, but this is not accurate if I were to export the data using the chart export function.
Any help with this as well would be greatly appreciated
Regards,
Mike D.
I decided to use the Gantt Series beacuse it has start and end datetime to easily plot the width. However I have found the Marks:Arrow Lengths Property do not appear to be working for the Gantt Series. I would like to be able to move Mark Text off of the Gantt Bar like you can with a line series...
Also,
I am working with streaming data (one stream per series) each stream can be a different interval (1s, 5s, 15s, etc). It appears that if I do not delete a point before it goes beyond the left wall in a 3D rotateable view, the series actually at times appears on the other (left) side of the wall. Is there a property that controls this (like clipoints). I have created a fix up for deleting points and creating new points to make an angled line appear correctly at the point of the left wall, but this is not accurate if I were to export the data using the chart export function.
Any help with this as well would be greatly appreciated
Regards,
Mike D.
Hi Mike,
To move the Marks to a custom position using the Gantt series type you must use something like the following code :width. However I have found the Marks:Arrow Lengths Property do not appear to be working for the Gantt Series. I would like to be able to move Mark Text off of the Gantt Bar like you can with a line series...
Code: Select all
Private Sub Form_Load()
With TChart1
.AddSeries scGantt
.Series(0).FillSampleValues 10
.Series(0).Marks.Visible = True
.Environment.InternalRepaint
With .Series(0).Marks.Positions
.Position(1).Custom = True
.Position(1).LeftTop.X = .Position(1).LeftTop.X + 20
.Position(1).LeftTop.Y = .Position(1).LeftTop.Y + 10
End With
End With
End Sub
I'm not sure what you refer, could you please post the code I you're using so I can reproduce the problem here ?I am working with streaming data (one stream per series) each stream can be a different interval (1s, 5s, 15s, etc). It appears that if I do not delete a point before it goes beyond the left wall in a 3D rotateable view, the series actually at times appears on the other (left) side of the wall. Is there a property that controls this (like clipoints). I have created a fix up for deleting points and creating new points to make an angled line appear correctly at the point of the left wall, but this is not accurate if I were to export the data using the chart export function.
Pep Jorge
http://support.steema.com
http://support.steema.com