Hi
Drawing a financial chart on default axes, I then add a volume graph on a custom axis directly below and sharing the same bottom axis. When I add a vertical teeCursor it only appears in the primary graph not for the custom axis. Is there a way to make the line simply extend for the full length of the Chart canvas? Hope this makes sense.
Cursor Tool & Clipping
'Clipping Nodes'
Sorry, forgot to add my question about 'clipping'. If user clicks on a series line I want to show nodes along the line to indicate it is the selectedf series, like you would see in a drawing app. Is there an easy way to do this?
Hi,
or use the Canvas techniques to draw a line over the Chart.
The best way to do this is to use another Cursor tool for the other Serie like in the following code :custom axis. Is there a way to make the line simply extend for the full length of the Chart canvas? Hope this makes sense.
Code: Select all
Private Sub Form_Load()
With TChart1
.Aspect.View3D = False
.AddSeries scCandle
.Series(0).FillSampleValues (25)
.Axis.Left.EndPosition = 75
.AddSeries scVolume
.Series(1).FillSampleValues (25)
a = .Axis.AddCustom(False)
.Axis.Custom(a).StartPosition = 75
.Axis.Custom(a).EndPosition = 100
.Series(1).VerticalAxisCustom = a
.Tools.Add tcCursor
.Tools.Items(0).asTeeCursor.Series = TChart1.Series(0)
.Tools.Items(0).asTeeCursor.Style = cssVertical
.Tools.Items(0).asTeeCursor.FollowMouse = True
.Tools.Items(0).asTeeCursor.Series = TChart1.Series(0)
.Tools.Add tcCursor
.Tools.Items(1).asTeeCursor.Series = TChart1.Series(1)
.Tools.Items(1).asTeeCursor.Style = cssVertical
.Tools.Items(1).asTeeCursor.FollowMouse = True
.Tools.Items(1).asTeeCursor.Series = TChart1.Series(1)
End With
End Sub
Private Sub TChart1_OnCursorToolChange(ByVal Tool As Long, ByVal X As Long, ByVal Y As Long, ByVal XVal As Double, ByVal YVal As Double, ByVal Series As Long, ByVal ValueIndex As Long)
If Tool = 0 Then
TChart1.Tools.Items(1).asTeeCursor.XVal = TChart1.Tools.Items(0).asTeeCursor.XVal
Else
TChart1.Tools.Items(0).asTeeCursor.XVal = TChart1.Tools.Items(1).asTeeCursor.XVal
End If
End Sub
Pep Jorge
http://support.steema.com
http://support.steema.com
Hi,
It will be available at runtime for the next maintenance releases.
How about using the SelectorTool (only avaiable at design time for the momment) ?Sorry, forgot to add my question about 'clipping'. If user clicks on a series line I want to show nodes along the line to indicate it is the selectedf series, like you would see in a drawing app. Is there an easy way to do this?
It will be available at runtime for the next maintenance releases.
Pep Jorge
http://support.steema.com
http://support.steema.com