Hi,
I want to add a floating annotation to the graph. The annotation's style is 'Text with an arrow'. The annotation's position on the graph is controlled by axes coordinates. As the annotation is added to the plot, its arrow is pointed towards zero. How do I control this behaviour?
I am attaching the test code.
Dim DataX(100) As Single
Dim DataY(100) As Single
Private Sub Command1_Click()
Dim Test_Note As CWAnnotation
Set Test_Note = CWGraph1.Annotations.Add
Test_Note.CoordinateType = cwAxesCoordinates
Test_Note.SnapMode = cwCSnapFloating
Test_Note.Caption.Text = "test"
Test_Note.Caption.XCoordinate = (CWGraph1.Axes(1).Maximum + CWGraph1.Axes(1).Minimum) / 2
Test_Note.Caption.YCoordinate = (CWGr
aph1.Axes(2).Maximum + CWGraph1.Axes(2).Minimum) / 2
End Sub
Private Sub Form_Load()
Dim i%
For i = LBound(DataX) To UBound(DataX)
DataX(i) = i
DataY(i) = Sin(i) * 100
Next
CWGraph1.PlotXvsY DataX, DataY
End Sub
Thanks in advance.
Pradyumna