$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
Chart Control for C# Windows Forms
Design Bar, Pie, Line, Area, Polar, Radar and Scatter for C# Windows Forms application
Home > WinForms UI Controls > User Manual > Chart Axes PlotMode in C#

Plot Mode Axes in Chart for WinForms C# Tutorial

The Plot Mode is a collection of Axis Plot Mode that is able to plot data in Cartesian Area for Chart in Windows Forms C# template projects. The PlotMode property is included in the axes of Categorical, DateTimeCategorical and DateTimeContinuous. Its valid values include AmongTicks, AtTicks, and AtTicksPadded

Valid Values of Axis Plot Mode

  • AmongTicks , this is a property used for plotting data points within the range, and it can be configured with the below two ticks.
  • ForTicks , this is a property used for plotting the data points for each single tick.
  • ForTicksPadded , the property is used for plotting data points for each single tick, whose axis ends has been applied on half step padding.
We are going to create a Categorical Axis in C# code in the below sample and assign Categorical Axis to a Bar Series, then add the series to the Chart. When the HAxis, horizontalAxis, property of the series is assigned while inserting into the Series collection, the chart will use the axis that is controlled by the property. However, when the property is null, the chart will create and assign a default axis.
The following C# code snippet sets the PlotMode of the HAxis to AmongTicks and the GapLength to 0.5.

CategoricalAxis hAxis = new CategoricalAxis();
hAxis.PlotMode = AxisPlotMode.AmongTicks;
hAxis.GapLength = 0.5;
The Categorical Axis may create the property value automatically. However, developers can customize the PlotMode as needed by using the method of the Axes collection, Get().

The Below C# code snippet shows how to change the PlotMode to ForTicks:

CategoricalAxis axis = chart1.Axes.Get<CategoricalAxis>(0);
axis.PlotMode = AxisPlotMode.ForTicksPadded;
To change the PlotMode property to ForTicksPadded, use the below C# code snippet

axis.PlotMode = AxisPlotMode.ForTicksPadded;
UI Controlsfor Windows Forms
.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls