Page 1 of 1
Set width of point
Posted: Tue Jan 20, 2004 8:08 pm
by 9078657
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!
Posted: Wed Jan 21, 2004 11:27 am
by Chris
Hi --
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
Decided to use Gantt series
Posted: Tue Jan 27, 2004 5:03 am
by 9078657
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.
Posted: Tue Jan 27, 2004 9:44 am
by Pep
Hi Mike,
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...
To move the Marks to a custom position using the Gantt series type you must use something like the following code :
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 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.
I'm not sure what you refer, could you please post the code I you're using so I can reproduce the problem here ?