Back to Devexpress

SecondaryAxisY2D Class

wpf-devexpress-dot-xpf-dot-charts-dot-secondaryaxisy2d.md

latest5.8 KB
Original Source

SecondaryAxisY2D Class

Represents the secondary Y-axis within a 2D chart type.

Namespace : DevExpress.Xpf.Charts

Assembly : DevExpress.Xpf.Charts.v25.2.dll

NuGet Package : DevExpress.Wpf.Charts

Declaration

csharp
public class SecondaryAxisY2D :
    AxisY2D
vb
Public Class SecondaryAxisY2D
    Inherits AxisY2D

The following members return SecondaryAxisY2D objects:

Remarks

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

The collection of the SecondaryAxisY2D objects is represented by the SecondaryAxisYCollection class, which is returned by the XYDiagram2D.SecondaryAxesY property.

The secondary X-axis is represented by the SecondaryAxisX2D class.

For more information, refer to Primary and Secondary Axes.

Example

This example demonstrates how to assign a secondary Y-axis to a series and uses the following classes and properties:

SymbolDescription
XYDiagram2D.SecondaryAxesYGets the collection of secondary Y-axes.
SecondaryAxisY2DRepresents the secondary Y-axis within a 2D chart type.
XYSeries2D.AxisYSpecifies the Y-axis (or its View Model) that measures a series.
xaml
<dxc:XYDiagram2D.SecondaryAxesY>
    <dxc:SecondaryAxisY2D x:Name="percentageAxisY" 
                          Brush="#FFC0504D">
        <dxc:SecondaryAxisY2D.WholeRange>
            <dxc:Range dxc:AxisY2D.AlwaysShowZeroLevel="False" MinValue="-0.8" MaxValue="0.8"/>
        </dxc:SecondaryAxisY2D.WholeRange>
        <dxc:SecondaryAxisY2D.NumericScaleOptions>
            <dxc:ContinuousNumericScaleOptions AutoGrid="False" GridSpacing="0.4"/>
        </dxc:SecondaryAxisY2D.NumericScaleOptions>
    </dxc:SecondaryAxisY2D>
</dxc:XYDiagram2D.SecondaryAxesY>
<dxc:LineSeries2D DisplayName="Rate of Change" 
                  ArgumentDataMember="Date" ValueDataMember="ChangeRate" 
                  MarkerVisible="True"
                  AxisY="{Binding ElementName=percentageAxisY}"/>

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SecondaryAxisY2D 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.

dashboard-constant-lines/CS/ConstantLineExtension.WPF/ConstantLineModuleStyle.xaml#L15

xml
<DataTemplate>
    <dxc:SecondaryAxisY2D Style="{Binding Path=(dxdash:ChartDashboardLayoutItem.SecondaryAxisYStyle), RelativeSource={RelativeSource Self}}">
        <dxc:SecondaryAxisY2D.ConstantLineInFrontItemsSource>

Inheritance

Show 14 items

Object DispatcherObject DependencyObject Visual UIElement FrameworkElement Control ChartElementBase ChartElement AxisBase Axis Axis2D AxisY2D SecondaryAxisY2D

See Also

SecondaryAxisY2D Members

SecondaryAxisYCollection

AxisY2D

SecondaryAxisX2D

DevExpress.Xpf.Charts Namespace