[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Collapse]Charts Suite
   [Collapse]Chart Control
    [Expand]Getting Started
    [Expand]Fundamentals
    [Expand]Providing Data
    [Expand]Appearance Customization
    [Expand]End-User Features
    [Expand]Design-Time Features
    [Collapse]Chart Elements
     [Expand]Diagram
     [Expand]Series
      Panes
     [Collapse]Axes
       Primary and Secondary Axes
       Axis Scale Types
       Whole and Visual Ranges
       Axis Layout and Appearance
       Axis Labels
       Axis Titles
       Constant Lines
       Strips
       Scale Breaks
       Tickmarks, Grid Lines, and Interlacing
      Legends
      Chart Titles
      Annotations
    [Expand]Examples
    [Expand]Additional Resources
   [Expand]Chart3D Control
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Primary and Secondary Axes

The 2D XY Diagram displays two primary axes (arguments' and values' axes) by default. You can use secondary axes to show series which have different argument (or value) ranges or measurement units that should be displayed in the same diagram. Like primary axes, secondary axes can have additional visual elements such as constant lines, strips, labels, titles, scale breaks, tickmarks, grid lines and interlacing.

The following image demonstrates a diagram with a primary y-axis on the left and a secondary y-axis on the right:

Expanded How to: Add a Secondary Axis to a Chart

The image below shows two series using a single axis. You can add a secondary axis to improve smaller value ranges' readability

The following code demonstrates how to create a secondary axis and bind it to a series:

Use the following classes and properties to specify a secondary x- or y-axis:

Class or Property Description
XYDiagram2D.SecondaryAxesX Provides access to the secondary x-axes' collection.
XYDiagram2D.SecondaryAxesY Provides access to the secondary y-axes' collection.
SecondaryAxisX2D A secondary x-axis.
SecondaryAxisY2D A secondary y-axis.
XYSeries2D.AxisX Specifies an x-axis to which the series is bound.
XYSeries2D.AxisY Specifies a y-axis to which the series is bound.

The following image demonstrates a secondary y-axis to the right of the diagram:

Expanded How to: Generate Secondary Axes in the MVVM Style

Use the following markup to populate a secondary y-axes' collection when developing a charting application using an MVVM design pattern:

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=T541777.

Use the following properties to generate secondary axes:

Property Description
XYDiagram2D.SecondaryAxisXItemsSource The collection that is used to generate secondary x-axes.
XYDiagram2D.SecondaryAxisYItemsSource The collection that is used to generate secondary y-axes.
XYDiagram2D.SecondaryAxisXItemTemplate Gets or sets a DataTemplate object specifying how secondary x-axes are displayed.
XYDiagram2D.SecondaryAxisYItemTemplate Gets or sets a DataTemplate object specifying how secondary y-axes are displayed.
XYDiagram2D.SecondaryAxisXItemTemplateSelector Specifies a custom logic defining which a DataTemplate object should be used to display secondary x-axes.
XYDiagram2D.SecondaryAxisYItemTemplateSelector Specifies a custom logic defining which a DataTemplate object should be used to display secondary y-axes.

Is this topic helpful?​​​​​​​