Jump to content
Software FX Community

Force Grid to Next Major Tick Point

User (Legacy)

Recommended Posts

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


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


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?



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


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


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


> Chart.Axis(AXIS_Y).Max = 700


> --

> FP

> Software FX, Inc.




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) *




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.

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