Jump to content
Software FX Community

Axis Spacing Issue


Recommended Posts

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.


Posted Image Posted Image


Does there exist a solution for this rendering issue?

Link to comment
Share on other sites

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.


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