Jump to content
Software FX Community

Force Grid to Next Major Tick Point


User (Legacy)
 Share

Recommended Posts

I know I can set this but I have a large set of data values and users can

interact

dynamically with that data (using ChartFX internet).

The max value is only 700 in this single case but I want to

make the graph extend to the next step value and draw that on the Y axis not

matter

what the datasets maxvalue is.

I could find some rounding method for the values and manually work it out

(not sure how yet) but I would be nice for it to be automated.

Can it be done by ChartFX internet?

Thanks

Chris

"SoftwareFX Support" <support@softwarefx.com> wrote in message

news:RBQ0orz3CHA.3068@webserver1.softwarefx.com...

> The Max value of this chart is less than 700, that's why you don't see

700.

> You can set the Max = 700 if you want by doing:

>

> Chart.Axis(AXIS_Y).Max = 700

>

> --

> FP

> Software FX, Inc.

>

>

post-2107-13922394633352_thumb.jpg

Link to comment
Share on other sites

The thing is this, we do adjust the scale to the next "round" number when

you call AdjustScale (or CloseData) but we only go up to 10% more. So if

your largest value is 680 you will get 700 as the max but if your value is

610 you wont (90 is more than 10 percent of 610). We do this to prevent

excessive waste of space, which is what most people want in our experience.

You can do your own rounding algorithm if you want to go beyond this barrier

(10%). To round it you can do:

Dim d As Double

d = ChartFX1.Axis(AXIS_Y).Max - ChartFX1.Axis(AXIS_Y).Min

Dim nDigits As Integer

nDigits = Int(Log(d) / Log(10))

Dim dPow As Double

dPow = 10 ^ nDigits

ChartFX1.Axis(AXIS_Y).Max = Int((ChartFX1.Axis(AXIS_Y).Max / dPow) + 0.99) *

dPow

--

FP

Software FX, Inc.

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