Jump to content
Software FX Community

Bar chart bug on tallest bar.


beltrams

Recommended Posts

Dear Forum,

I have a simple bar chart with 2 bars Y values 10 and 40. The 10 bar is rendered correctly, so that it exactly has the top on 10, but the 40 fall short: its top it is a bit under the 40 mark.

In general this happens always: the tollest bar it is always a bit shorter than it shoud.

 Any idea on this?

Thanks!

Link to comment
Share on other sites

There is a feature were we increase the axis space a little bit so that users don't think the bar is clipped but if you show gridlines and/or create a custom gridline at 40 you should see that the top of bar perfectly matches with the 40 label.

JuanC

Link to comment
Share on other sites

Note that there is a line (gray) to the right of the 40 label in the Y axis, this line is aligned with the bar.

I can see how this could be confusing, one possibility would be to set the Axes Style property as follows

  chart1.PlotArea.AxesStyle = AxesStyle.Math; 

Another possibility would be to turn off the feature where we make sure the space is added, note that if you turn off this feature and then show the point labels, the label for the top value might be clipped

chart1.AxisY.AutoMargin = false;

To create a custom grid line so that you can see that in the original chart the bar with 40 was pointed correctly

  CustomGridLine customGridLine = new CustomGridLine();   customGridLine.Value = 40;   chart1.AxisY.CustomGridLines.Add(customGridLine);

JuanC

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.

×
×
  • Create New...