Jump to content
Software FX Community

X-axis top/bottom margins


Recommended Posts

The following XAML shows how to minimize the space used by the X axis

<StackPanel Orientation="Horizontal" Grid.Row="1">

<cfx:Chart Gallery="Bar" x:Name="chart1" Width="300" Height="280" Style="{x:Static cfxMotifs:Basic.Style}">





  <cfx:LegendBox Visibility="Collapsed"/>






<cfx:Chart Gallery="Bar" x:Name="chart2" Width="300" Height="280" Style="{x:Static cfxMotifs:Basic.Style}">










<cfx:LegendBox Visibility="Collapsed"/>






<cfx:PlotAreaAttributes Margin="8"/>






<cfx:Axis Separation="0">








<cfx:GridLine TickSize="4"/>






<cfx:GridLine TickSize="2"/>











Note the following

- Chart.Style set to Basic to simplify the chart layout

- PlotArea.Margin set to 8, this is not directly related to your question but will minimize space taken on the top and right of the plot area. You could set the margin to 0 if you do not show the chart border, otherwise it might look a little crowded

- Axis.Separation set to 0

- GridLine.TickSize reduced for both Major and Minor Grid lines. Note that you can win a little more space by setting the TickMark to None

We found that we can save a few more pixels when Separation is set to 0, this will be fixed in future hotfixes/service packs.



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