Jump to content
Software FX Community

Re: last label on X or Y axis apppears bold when using AS_SHOWENDS


User (Legacy)
 Share

Recommended Posts

Right off the bat, SoftwareFX advises in the help that the .TypeMask, Style properties are "masks" and ...

"This property is a mask property. this means all settings represent a bit in the word that you need to turn on or off according to what you want. For this purpose you'll use the bitwise operators (And, Or, Not, Xor) provided by your development tool.

Because it is a mask property, you must make sure you use these operators to turn on/off bits and avoid losing previous settings to the property."

So to start, try:

chart.TypeMask = chart.TypeMask OR &H6880001&

chart.Style = chart.Style OR &HFF6FFFFF&

I'll look at the rest.

Steve

Joe Westersund <jwesters@epri.com> wrote in message news:bMB#94hXAHA.3124@sfxserver.softwarefx.com...

> Steve,

>

> Thanks for taking a look at my problem. I've attached a copy of my code,

> which may help clarify things.

>

> Below, I've cut & pasted the lines of code that seem relevant to the

> axes:

>

> Joe Westersund

>

> Set chart = Server.CreateObject("ChartFX.WebServer")

> chart.TypeMask = &H6880001&

> chart.Style = &HFF6FFFFF&

> chart.AxesStyle = 2 'only tickmarks will be shown on the axes

>

> chart.Axis(AXIS_X).Format = "XMM/dd/yyyy HH:mm"

> chart.Axis(AXIS_X).Style = chart.Axis(AXIS_X).Style Or AS_FORCEZERO 'make

> sure the beginning & ending date are showing, and that zero is shown on the

> graph

> chart.Axis(AXIS_X).Style = chart.Axis(AXIS_X).Style OR AS_SHOWENDS 'This

> causes the end label on the x axis to display, but also seems to sometimes

> cause the last label to overlap the next-to-last.

> chart.Axis(AXIS_X).LabelAngle = 90 'have y axis labels appear at a 90 degree

> angle

> chart.Axis(AXIS_Y).Style = chart.Axis(AXIS_Y).Style OR AS_SHOWENDS

>

> 'set the Y axis formatting

> minForLabels = Abs(Min(Min(yAxisObj.Min, yAxisObj.Max),yAxisObj.Min -

> yAxisObj.Max))

>

> if minForLabels < 10000 and minForLabels > 100 then

> yAxisObj.Format = AF_NUMBER

> yAxisObj.Decimals = 0

> Elseif minForLabels <= 100 and minForLabels > 10 then

> yAxisObj.Format = AF_NUMBER

> yAxisObj.Decimals = 0

> Elseif minForLabels <= 10 and minForLabels > 1 then

> yAxisObj.Format = AF_NUMBER

> yAxisObj.Decimals = 1

> ElseIf minForLabels <= 1 and minForLabels > 0.01 then

> yAxisObj.Format = AF_NUMBER

> yAxisObj.Decimals = 2

> ElseIf minForLabels <= 0.01 and minForLabels > 0.001 then

> yAxisObj.Format = AF_NUMBER

> yAxisObj.Decimals = 3

> Else

> yAxisObj.Format = AF_SCIENTIFIC '"0.00E-00"

> yAxisObj.Decimals = 2

> End if

>

> if (Request.QueryString.Item("graphLog")) and not negativeDataFlag then

> 'if user wants log plot and there is no negative data

> yAxisObj.LogBase = 10

> chart.RecalcScale

> if(gLeftTitle <> "") then yAxisObj.title = "Log " & gLeftTitle

> Session("negativeDataFlag") = false

> else

> yAxisObj.LogBase = 0

> yAxisObj.title = gLeftTitle

> Session("negativeDataFlag") = negativeDataFlag

> end if

>

> 'set the number of x labels

> xAxisObj.STEP = (xAxisObj.max - xAxisObj.min) / 5.0

>

>

>

>

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

> news:aLRxPUhXAHA.1440@sfxserver.softwarefx.com...

> Joe,

>

> I've never had this trouble but first thought, "ignore" the problem and

> make all labels bold.

>

> Do you do anything else to the X axis?

>

> Steve

>

> Joe Westersund <jwesters@epri.com> wrote in message

> news:YNVDLU$WAHA.3124@sfxserver.softwarefx.com...

> > Hello!

> >

> > I'm having a small problem with the formatting of some graphs. I'm

> > making a 2D line graph, with each point having an X and Y value.

> >

> > I have set both the X and Y axis to show a label for the end point on

> > the axis, using

> >

> > ChartFX1.Axis(AXIS_Y).Style = ChartFX1.Axis(AXIS_Y).Style Or AS_SHOWENDS

> >

> > and

> >

> > ChartFX1.Axis(AXIS_X).Style = ChartFX1.Axis(AXIS_X).Style Or AS_SHOWENDS

> >

> > This works OK, except that, depending on the input data, the last label on

> > either axis appears to be in bold text - my guess is that the last label

> on

> > the axis is overlapping with another label that is placed right next to

> it.

> > Setting AS_NOTCLIPPED either on or off does not appear to make a

> difference.

> > I've attached a copy of a sample graph to this email, so you can see what

> I

> > mean.

> >

> > Any advice for me?

> >

> > Joe Westersund

> > (650) 855 - 8724

> >

> >

> >

>

>

>

>

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.

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

 Share

×
×
  • Create New...