This example demonstrates how to configure resolve overlapping for axis labels.
Use the following parameters of Axis2D.ResolveOverlappingOptions.
- AllowHide - allows you to specify a value indicating whether or not to hide axis labels on resolve overlapping.
- AllowRotate - allows you to specify a value indicating whether or not to rotate axis labels on resolve overlapping.
- AllowStagger - allows you to specify a value indicating whether or not to stagger axis labels on resolve overlapping.
- MinIndent - allows you to specify the minimum indent between adjacent axis labels when an overlap resolution algorithm is applied to them.
Files to Review
Documentation
Does this example address your development requirements/objectives?
(you will be redirected to DevExpress.com to submit your response)
Example Code
XAML<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/charts"
x:Class="ResolveOverlappingSample.MainWindow"
Title="MainWindow" Height="360" Width="640">
<Grid>
<dxc:ChartControl>
<dxc:ChartControl.Titles>
<dxc:Title Content="Weather in London"
Dock="Top"
HorizontalAlignment="Center"
VerticalAlignment="Top"/>
</dxc:ChartControl.Titles>
<dxc:XYDiagram2D>
<!--region #ResolveOverlapping-->
<dxc:XYDiagram2D.AxisX>
<dxc:AxisX2D>
<dxc:AxisX2D.DateTimeScaleOptions>
<dxc:ManualDateTimeScaleOptions
MeasureUnit="Hour"
GridAlignment="Hour"
GridSpacing="6"
AutoGrid="False" />
</dxc:AxisX2D.DateTimeScaleOptions>
<dxc:AxisX2D.Label>
<dxc:AxisLabel TextPattern="{}{A:dd/MM HH:mm}">
<dxc:Axis2D.ResolveOverlappingOptions>
<dxc:AxisLabelResolveOverlappingOptions
AllowHide="True"
AllowRotate="True"
AllowStagger="True"
MinIndent="5" />
</dxc:Axis2D.ResolveOverlappingOptions>
</dxc:AxisLabel>
</dxc:AxisX2D.Label>
</dxc:AxisX2D>
</dxc:XYDiagram2D.AxisX>
<!--endregion #ResolveOverlapping-->
<dxc:XYDiagram2D.Series>
<dxc:BarSideBySideSeries2D
ArgumentScaleType="DateTime"
ValueScaleType="Numerical"
BarWidth="1.5"
DisplayName="Relative humidity (%)">
<dxc:BarSideBySideSeries2D.Model>
<dxc:SimpleBar2DModel/>
</dxc:BarSideBySideSeries2D.Model>
<dxc:BarSideBySideSeries2D.Points>
<dxc:SeriesPoint Argument="06/11/2008 06:00:00.000" Value="69"/>
<dxc:SeriesPoint Argument="06/11/2008 03:00:00.000" Value="76"/>
<dxc:SeriesPoint Argument="06/11/2008 00:00:00.000" Value="66"/>
<dxc:SeriesPoint Argument="06/10/2008 21:00:00.000" Value="49"/>
<dxc:SeriesPoint Argument="06/10/2008 18:00:00.000" Value="45"/>
<dxc:SeriesPoint Argument="06/10/2008 15:00:00.000" Value="48"/>
<dxc:SeriesPoint Argument="06/10/2008 12:00:00.000" Value="57"/>
<dxc:SeriesPoint Argument="06/10/2008 09:00:00.000" Value="66"/>
<dxc:SeriesPoint Argument="06/10/2008 06:00:00.000" Value="78"/>
<dxc:SeriesPoint Argument="06/10/2008 03:00:00.000" Value="83"/>
<dxc:SeriesPoint Argument="06/10/2008 00:00:00.000" Value="72"/>
<dxc:SeriesPoint Argument="06/09/2008 21:00:00.000" Value="52"/>
<dxc:SeriesPoint Argument="06/09/2008 18:00:00.000" Value="40"/>
<dxc:SeriesPoint Argument="06/09/2008 15:00:00.000" Value="41"/>
<dxc:SeriesPoint Argument="06/09/2008 12:00:00.000" Value="37"/>
<dxc:SeriesPoint Argument="06/09/2008 09:00:00.000" Value="41"/>
<dxc:SeriesPoint Argument="06/09/2008 06:00:00.000" Value="68"/>
<dxc:SeriesPoint Argument="06/09/2008 03:00:00.000" Value="78"/>
<dxc:SeriesPoint Argument="06/09/2008 00:00:00.000" Value="71"/>
<dxc:SeriesPoint Argument="06/08/2008 21:00:00.000" Value="63"/>
<dxc:SeriesPoint Argument="06/08/2008 18:00:00.000" Value="47"/>
<dxc:SeriesPoint Argument="06/08/2008 15:00:00.000" Value="44"/>
<dxc:SeriesPoint Argument="06/08/2008 12:00:00.000" Value="48"/>
<dxc:SeriesPoint Argument="06/08/2008 09:00:00.000" Value="68"/>
<dxc:SeriesPoint Argument="06/08/2008 06:00:00.000" Value="81"/>
<dxc:SeriesPoint Argument="06/08/2008 03:00:00.000" Value="85"/>
<dxc:SeriesPoint Argument="06/08/2008 00:00:00.000" Value="76"/>
<dxc:SeriesPoint Argument="06/07/2008 21:00:00.000" Value="65"/>
<dxc:SeriesPoint Argument="06/07/2008 18:00:00.000" Value="57"/>
<dxc:SeriesPoint Argument="06/07/2008 15:00:00.000" Value="62"/>
<dxc:SeriesPoint Argument="06/07/2008 12:00:00.000" Value="53"/>
<dxc:SeriesPoint Argument="06/07/2008 09:00:00.000" Value="62"/>
<dxc:SeriesPoint Argument="06/07/2008 06:00:00.000" Value="76"/>
<dxc:SeriesPoint Argument="06/07/2008 03:00:00.000" Value="80"/>
<dxc:SeriesPoint Argument="06/07/2008 00:00:00.000" Value="82"/>
<dxc:SeriesPoint Argument="06/06/2008 21:00:00.000" Value="73"/>
<dxc:SeriesPoint Argument="06/06/2008 18:00:00.000" Value="57"/>
<dxc:SeriesPoint Argument="06/06/2008 15:00:00.000" Value="55"/>
<dxc:SeriesPoint Argument="06/06/2008 12:00:00.000" Value="64"/>
<dxc:SeriesPoint Argument="06/06/2008 09:00:00.000" Value="74"/>
<dxc:SeriesPoint Argument="06/06/2008 06:00:00.000" Value="89"/>
<dxc:SeriesPoint Argument="06/06/2008 03:00:00.000" Value="87"/>
<dxc:SeriesPoint Argument="06/06/2008 00:00:00.000" Value="80"/>
</dxc:BarSideBySideSeries2D.Points>
</dxc:BarSideBySideSeries2D>
</dxc:XYDiagram2D.Series>
</dxc:XYDiagram2D>
</dxc:ChartControl>
</Grid>
</Window>