$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 Categorical in C#

Categorical in Chart for WinForms C# Tutorial

Categorical axes are used to plot data storing categorical values in Chart. The categorical axes can only used in the context of Cartesian Area type. When the input data isn’t in accordance with the category, the categorical axis will assign a default category to each point. The default category assignment will be based on the place of the data point in the DataPoints collection.

Properties of Categorical Axis for Chart

  • GapLength, this is the property used to configure the length of a gap and the valid value ranges from 0 to 1.
  • PlotMode, this is the property used to customizing the AxisPlotMode. The available values contain BetweenTicks, OnTicks and OnTicksPadded.
  • BetweenTicks, a value of the PlotMode and plots points in the valid value range.
  • OnTicks, a value of the PlotMode and plots the points over each tick.
  • OnTicksPadded, a value of the PlotMode and plots points over each tick.
  • MajorTickInterval, the property used for configuring the step where the ticks are positioned.
  • HorizontalLocation, the property used for configuring the horizontal location of the axis in relation to the plot area. The available valid values are Top and Bottom.
  • VerticalLocation, the property used for configuring the vertical location of the axis in relation to the plot area. The available valid values are Left and Right.

LineSeries series = new LineSeries();
series.DataPoints.Add(new CategoricalDataPoint(3, "Desks"));
series.DataPoints.Add(new CategoricalDataPoint(2, "Tables"));
series.DataPoints.Add(new CategoricalDataPoint(1, "Coach"));
series.DataPoints.Add(new CategoricalDataPoint(8, "Chairs"));
ChartView1.Series.Add(series);

CategoricalAxis horizontalAxis = series.HorizontalAxis as CategoricalAxis;
if (horizontalAxis != null)
{
horizontalAxis.PlotMode = AxisPlotMode.BetweenTicks;
horizontalAxis.LabelFitMode = AxisLabelFitMode.MultiLine;
}

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