beltrams Posted July 3, 2012 Report Share Posted July 3, 2012 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! Quote Link to comment Share on other sites More sharing options...
JuanC Posted July 3, 2012 Report Share Posted July 3, 2012 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 Quote Link to comment Share on other sites More sharing options...
beltrams Posted July 3, 2012 Author Report Share Posted July 3, 2012 Hello JuanC, I don't understand 100% what you are saying, at the moment I have a gridline and on the Y axis I have 10, 20, 30, 40. The bar doesn't reach the 40. HOw do I create this custom gridline? Please see the screenshoot: https://docs.google.com/open?id=0B6Y2SBg7Gy6cTk42eGRETFAzSGs Quote Link to comment Share on other sites More sharing options...
JuanC Posted July 3, 2012 Report Share Posted July 3, 2012 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 Quote Link to comment Share on other sites More sharing options...
beltrams Posted July 3, 2012 Author Report Share Posted July 3, 2012 Oh... Many thanks JuanC... I havent noticed that grey line before... Please, can I apply those solution in xaml? I don't have code behind... Many thanks again! Quote Link to comment Share on other sites More sharing options...
beltrams Posted July 3, 2012 Author Report Share Posted July 3, 2012 Done it! Many many thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.