Skip to main content
A newer version of this page is available. .

SecondaryAxisX2D Class

A secondary X-axis in the Chart Control’s Cartesian Diagram.

Namespace: DevExpress.Xpf.Charts

Assembly: DevExpress.Xpf.Charts.v19.1.dll

Declaration

public class SecondaryAxisX2D :
    AxisX2D

The following members return SecondaryAxisX2D objects:

Remarks

The SecondaryAxisX2D class represents the secondary axis of arguments (X-axis) within a chart control. It inherits properties and methods from its base AxisX2D class, which implements the common X-axes functionality.

The collection of the SecondaryAxisX2D objects is represented by the SecondaryAxisXCollection class, which is returned by the XYDiagram2D.SecondaryAxesX property.

The secondary Y-axis is represented by the SecondaryAxisY2D class.

For more information, refer to Primary and Secondary Axes.

Example

This example demonstrates how to assign a pane and a secondary X-axis to a series. The example uses the following classes and properties:

Symbol Description
XYDiagram2D.SecondaryAxesX Gets the collection of secondary X-axes.
SecondaryAxisX2D A secondary X-axis in the Chart Control’s Cartesian Diagram.
XYSeries2D.AxisX Specifies the X-axis (or its View Model) that measures the series.
XYDiagram2D.Panes Provides access to the diagram‘s pane collection.
Pane An individual pane within the Chart Control’s Cartesian Diagram.
XYSeries2D.Pane Specifies the pane (or its View Model) on which the series is plotted.
<dxc:XYDiagram2D.Panes>
    <dxc:Pane x:Name="secondPane" Margin="0,4,0,0"/>
</dxc:XYDiagram2D.Panes>
<dxc:XYDiagram2D.SecondaryAxesX>
    <dxc:SecondaryAxisX2D x:Name="secondAxisX" Alignment="Near">
        <dxc:SecondaryAxisX2D.QualitativeScaleOptions>
            <dxc:QualitativeScaleOptions AutoGrid="False" AggregateFunction="Sum"/>
        </dxc:SecondaryAxisX2D.QualitativeScaleOptions>
    </dxc:SecondaryAxisX2D>
</dxc:XYDiagram2D.SecondaryAxesX>
    <dxc:BarSideBySideSeries2D x:Name="secondSeries" DisplayName="Meat/Poultry"
                               ArgumentDataMember="ProductName" ValueDataMember="ExtendedPrice" FilterString="[CategoryName] = 'Meat/Poultry'"
                               Pane="{Binding ElementName=secondPane}" AxisX="{Binding ElementName=secondAxisX}" Legend="{Binding ElementName=secondLegend}"/>

The following code snippets (auto-collected from DevExpress Examples) contain references to the SecondaryAxisX2D 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.

See Also