Jump to content
Software FX Community

Attaching an Annotation to an X Axis in Time format

User (Legacy)

Recommended Posts


I am currently evaluting the chartfx control for my company and I have a

quick question regarding a demo I am trying to put together.

The X Axis in my demo has to be in TIME format which I have done and I am

able to add points to the chart with no problems.

Now I would like to add annotations attached to certain points on the chart.

I have tried several things and at the moment I have ...

Dim r As AnnArrow

Set r = annotX.Add(OBJECT_TYPE_ARROW)

r.HeadStyle = ARROW_NONE

r.Height = 100

r.Attach ATTACH_CENTER, "T12:00, 50"

r.Refresh True

Which I am expecting to create a line 12 hours along the X axis and 50 units

on the Y axis!?




Link to comment
Share on other sites

The Attach method takes only numbers as does Chart FX.

Every date/time has a numeric representation.

In VB you can do:

Dim a As Date

Dim d As Double

a = CDate("13:00")

d = a

d will end up containing the numeric representation of 13:00.

This will be the number you will pass to the Attach method.



Software FX

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