Jump to content
Software FX Community

Re: Annotation Help


User (Legacy)

Recommended Posts

Thank you Frank, "U da Man!"

Steve

Francisco Padron <frankp@softwarefx.com> wrote in message news:PtGPfxIKAHA.2224@sfxserver.softwarefx.com...

> These functions are included in CFXOCX.BAS.

>

> --

>

> Frank

> SFX

> "SteveT" <stephent@compassadv.com> wrote in message

> news:T4MhUazIAHA.2224@sfxserver.softwarefx.com...

> Frank,

>

> I'm using Access 2000 and trying to get a better handle on Annotation.

> Thanks to your past help, I can drop labels or whatever, next to points with

> code like the following:

>

> 'add text object to AnnotX and set options

> Set objText = AnnotX.Add(OBJECT_TYPE_TEXT)

>

> 'set objText equal to Legend

> objText.Text = rsData.Fields(3).Value

>

> objText.Color = vbBlack

> objText.Font.Size = 9

> objText.BkColor = CHART_TRANSPARENT

>

> 'Give it height and width, then SizeToFit

> objText.Width = 5

> objText.Height = 5

> objText.SizeToFit

>

> 'attach annotation object

> objText.Attach ATTACH_CENTER, CStr(.XValueEx(j, 0)) & "," &

> CStr(.ValueEx(j, 0) + 0.05) '.05 above marker

>

>

>

> However, I seem to be unable to get the PaintInfo sample code from the Help

> files to work.

>

> The PaintInfo method baffles me.

>

> It seems I need to set the .TypeMask property for the Chart object to

> "respond"

>

> ChartFX1.TypeMask = .TypeMask Or CT_PAINTMARKER

> And I can get the Object to fire a MsgBox showing all the variables

> but in the example of annotation below, I don't understand where I "find"

> the following functions:

>

> CHART_ML(i,j)

> CHART_LOWORD(nMarkerPosition)

> CHART_HIWORD(nMarkerPosition)

>

> Would you please "enlighten me"? I've searched with the Object Browser

> through the

> Chart Control, Annotation Extension, and SfxBar.

>

> Thank you,

>

> Steve

>

>

> Sample from Help:

>

> Dim r As AnnArrow

> Set r = AnnotX.Add(OBJECT_TYPE_ARROW)

> Dim nMarkerPosition As Long

> Dim x, y As Integer

>

> For i = 0 To (ChartFX1.nSeries - 1)

> For j = 0 To (ChartFX1.NValues - 1)

> If (ChartFX1.ValueEx(i, j) > 50) Then

> nMarkerPosition = ChartFX1.PaintInfo(CPI_MARKERTOPIXEL,

> CHART_ML(i, j))

> x = CHART_LOWORD(nMarkerPosition)

> y = CHART_HIWORD(nMarkerPosition)

> r.Left = x

> r.Top = y

> r.Width = 0

> r.Height = -10

> r.BkColor = RGB(255, 255, 0)

> r.AllowMove = False

> r.AllowModify = False

> r.Refresh False

> End If

> Next j

> Next i

>

>

>

>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...