Jump to content
Software FX Community

Removing annotation objects

User (Legacy)

Recommended Posts


I use the following code (from the newsgroup) to add an annotation to my


How do I remove it afterwards?

I tried getting annotx.count but it was zero the next time i redrew my




Here's a way to annotate your chart using VB.

Make sure you set a reference to the Annotation Extension.

Private Sub Form_Load()

Dim obj As ChartFX

Dim AnnotX As AnnotationX

Dim c As AnnCircle

Dim i As Integer, j As Integer

Dim strAttach As String

'set reference to chart object on the form

Set obj = Me.ChartFX1.Object

'instanciate the annotation object

Set AnnotX = New AnnotationX

'turn off toolbar (unless you want it on)

Annotx.Toolbar = False

'add AnnotX to chart obj

obj.AddExtension AnnotX

'add an annotation circle


'turn off series point markers

obj.MarkerShape = MK_NONE

'pick you point to mark

i = 0 'series

j = 7 'point index

'size the circle

c.Width = 10

c.Height = 10

'set attach coordinates

strAttach = CStr(j + 1) & "," & CStr(obj.ValueEx(i, j))

c.Attach ATTACH_CENTER, CStr(strAttach)

'what good is it without color

c.BkColor = obj.Series(i).Color 'back color

c.Color = obj.Series(i).Color 'border color

Set c = Nothing

Set obj = Nothing

End Sub

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...