CrosshairAxisLabelOptions Class
Contains settings that define the appearance of crosshair axis labels.
Namespace: DevExpress.Xpf.Charts
Assembly: DevExpress.Xpf.Charts.v24.2.dll
NuGet Package: DevExpress.Wpf.Charts
Declaration
Related API Members
The following members return CrosshairAxisLabelOptions objects:
Remarks
Use the Axis2D.CrosshairAxisLabelOptions property to get access to the CrosshairAxisLabelOptions object.
The following XAML demonstrates how this can be done for the X-axis:
<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="WpfApplication1.MainWindow"
Title="MainWindow" Height="350" Width="525">
<Grid>
<dxc:ChartControl>
<dxc:XYDiagram2D>
<dxc:XYDiagram2D.AxisX>
<dxc:AxisX2D>
<dxc:AxisX2D.CrosshairAxisLabelOptions>
<dxc:CrosshairAxisLabelOptions Background="Aqua" Foreground="Azure"
FontSize="14" FontStyle="Italic">
</dxc:CrosshairAxisLabelOptions>
</dxc:AxisX2D.CrosshairAxisLabelOptions>
</dxc:AxisX2D>
</dxc:XYDiagram2D.AxisX>
<dxc:LineSeries2D>
<dxc:SeriesPoint Argument="A" Value="3"/>
<dxc:SeriesPoint Argument="B" Value="6"/>
<dxc:SeriesPoint Argument="C" Value="7"/>
<dxc:SeriesPoint Argument="D" Value="9"/>
</dxc:LineSeries2D>
</dxc:XYDiagram2D>
<dxc:ChartControl.CrosshairOptions>
<dxc:CrosshairOptions ShowArgumentLabels="True" ShowValueLabels="True" />
</dxc:ChartControl.CrosshairOptions>
</dxc:ChartControl>
</Grid>
</Window>
Note
To see the appearance changes of crosshair axis labels on a diagram, set the CrosshairOptions.ShowArgumentLabels and CrosshairOptions.ShowValueLabels properties to true.
For more information on how to use a crosshair cursor, refer to the Crosshair Cursor topic.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the CrosshairAxisLabelOptions class.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.