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


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

  • Create New...