Articles in this section
Category / Section

What are the types of axis supported by chart? Do we have the option to display the axes in reverse display?

1 min read

 

Chart Axes has two types of basic axes.They are

1 . Primary Axis

2. Secondary Axis

Primary Axis is the default axis. Secondary Axis is which we add it programatically. Secondary Axis can be created using ChartAxis class. We can also draw the axes into opposite direction. For X axis we need to set OpposedPosition property to true. For Y axis we need to set Inversed property to true.

C#

// Creating secondary axis

private ChartAxis secXAxis = new ChartAxis();

this.secXAxis.RangeType = ChartAxisRangeType.Auto;

this.chartControl1.Axes.Add(this.secXAxis);

this.secXAxis.OpposedPosition = true;

this.secXAxis.Range = new MinMaxInfo(0,5,1);

// To display the axes in opposite direction

this.chartControl1.PrimaryXAxis.OpposedPosition = this.checkBox1.Checked;

this.chartControl1.PrimaryYAxis.Inversed = this.checkBox1.Checked;

VB

' Creating secondary axis

Dim secXAxis As ChartAxis = New ChartAxis()

Me.secXAxis.RangeType = ChartAxisRangeType.Auto

Me.ChartControl1.Axes.Add(Me.secXAxis)

Me.secXAxis.OpposedPosition = true

Me.secXAxis.Range = new MinMaxInfo(0,5,1)

' To display the axes in opposite direction

Me.ChartControl1.PrimaryXAxis.OpposedPosition = Me.CheckBox1.Checked

Me.ChartControl1.PrimaryYAxis.Inversed = Me.CheckBox1.Checked

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied