MrDosu Posted March 18, 2009 Report Share Posted March 18, 2009 Dear SoftwareFX WPF team, I am having a problem with setting the chart scales in one specific case. Eg on a Barchart with 2 Bars of value 100 and an Yaxis scaling of 0/100 (min/max) there is a small space above the 100-Point over the axis. Setting the chart.Gallery to Gantt lets the unwanted gap still appear on the top (see pictures). I was able to temporaily fix the issue with custom building PlotArea.Templates for each case, but this would not be acceptable in the final production environment. Unfortunatly this would be a killer for us for using ChartFX for WPF, where the other features seem very impressive so far. Does there exist a solution for this rendering issue? Quote Link to comment Share on other sites More sharing options...
JuanC Posted March 18, 2009 Report Share Posted March 18, 2009 This is actually a feature, the idea is that we auto calculate the axis margin to avoid clipping, e.g if in your chart you turn on labels and position them on top of the bars, more space will be needed in order to show the labels. <cfx:Chart.AllSeries> <cfx:AllSeriesAttributes> <cfx:AllSeriesAttributes.PointLabels> <cfx:PointLabelAttributes Visibility="Visible" VerticalAlignment="Top" /> </cfx:AllSeriesAttributes.PointLabels> </cfx:AllSeriesAttributes></cfx:Chart.AllSeries>You can turn this feature off this by setting the AutoMargin property to false, e.g. <cfx:Chart.AxisY> <cfx:Axis AutoMargin="True"/></cfx:Chart.AxisY>or in code chart1.AxisY.AutoMargin = false; Hope this helps.JuanC Quote Link to comment Share on other sites More sharing options...
MrDosu Posted March 19, 2009 Author Report Share Posted March 19, 2009 Yes, this fixes the issue perfectly, 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.