Jump to content
Software FX Community

Attaching an Annotation to an X Axis in Time format


User (Legacy)

Recommended Posts

Hello,

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!?

Help!

Thanks,

Andy.

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.

--

FP

Software FX

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...