Set width of point

TeeChart for ActiveX, COM and ASP
Post Reply
miked
Newbie
Newbie
Posts: 8
Joined: Fri Nov 15, 2002 12:00 am

Set width of point

Post by miked » Tue Jan 20, 2004 8:08 pm

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!

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Wed Jan 21, 2004 11:27 am

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
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/

miked
Newbie
Newbie
Posts: 8
Joined: Fri Nov 15, 2002 12:00 am

Decided to use Gantt series

Post by miked » Tue Jan 27, 2004 5:03 am

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.

Pep
Site Admin
Site Admin
Posts: 3305
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Tue Jan 27, 2004 9:44 am

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 ?

Post Reply