Jump to content
Software FX Community

need help with grid lines

User (Legacy)

Recommended Posts

Hi all,

I am using ChartFX client server 5.1 in a MFC-based application. What I

want to do is seemingly very simple, but I have not able to get it the way I

want it to be. I want to have a line or bar chart always with 11 horizontal

and 11 vertical grid lines visible. I will set the min's, max's and steps

for both the X and Y axis manually according to this fomular: min + 10 *

step = max. I receive min and step from user input. If for whatever reason

the data is out of range, the chart should just ignore those points. I am

able to get Y axis to always have 11 grid lines, but ChartFX autoscales the

X axis for me despite me setting the autoscale property to false. Any help

would be appreciated. Thanks.


Link to comment
Share on other sites

In a Bar chart, the X-Axis is categorical. What this means is that the

number of points in the chart determine the size of it. Setting the Max for

the X-Axis of a categorical chart has NO EFFECT.

In your X-Axis your data is never out of range.

You can use the SetScrollView method to set up the X-Axis so than only a

sub-set of 10 points is visible.

If you don't what the user to see the scrollbar, you can turn off the Style

CS_SCROLLBARS (Style property) as follows:

char.Style = char.Style and not CS_SCROLLBARS



Software FX

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