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

Bar Series of Chart for WinForms C# Tutorial

The Series Types of Chart View is a collection of Chart Series, including Area, SplineArea, Bar, Line, Spline, Scatter point, Combined series. The Chart control provides two primary functions to Chart series. One is a collection used to stand for the specific data and the other is to visualize the data by using a predefined model. The following are the series types that the Chart support, including Bar, Pie, Line, Area, Donut, Scatter, Polar, Stock, Radar, Categorical or Polar.
The Bar Series are used to visualize data points as bar blocks. In the bar blocks, the value of magnitude can be controlled by the height of each bar. The bars may require one categorical and one numerical axis as a descendant of Categorical series.

How to Populate Bar Series

The following C# code snippet shows the steps of populating the Bar Series manually

BarSeries barSeries = new BarSeries("Performance", "RepresentativeName");
barSeries.Name = "Q1";
barSeries.DataPoints.Add(new CategoricalDataPoint(172, "Mark"));
barSeries.DataPoints.Add(new CategoricalDataPoint(156, "Simon"));
barSeries.DataPoints.Add(new CategoricalDataPoint(180, "Alex"));
barSeries.DataPoints.Add(new CategoricalDataPoint(147, "Michael"));
barSeries.DataPoints.Add(new CategoricalDataPoint(178, "Richard"));

BarSeries barSeries2 = new BarSeries("Performance", "RepresentativeName");
barSeries2.Name = "Q2";
barSeries2.DataPoints.Add(new CategoricalDataPoint(172, "Mark"));
barSeries2.DataPoints.Add(new CategoricalDataPoint(156, "Simon"));
barSeries2.DataPoints.Add(new CategoricalDataPoint(180, "Alex"));
barSeries2.DataPoints.Add(new CategoricalDataPoint(147, "Michael"));
barSeries2.DataPoints.Add(new CategoricalDataPoint(178, "Richard"));

Customizing Properties and Values of Bar Series for Chart

  • DisplayLabels, this is a Boolean property and is used for displaying the each bar labels. The vertical and horizontal orientations together with the CombineMode are able to position the specific place of the labels.
  • CombineMode, this is a common property used for all categorical series, which introduces a mechanism for combining data points that reside in different series without the same category. The available valid value contains None, Cluster, Stack and Stack100.
  • None, a value of the CombineMode, used for plotting the series independent from each other
  • Cluster, a value of the CombineMode, used for displaying data points in the same category
  • Stack, a value of the CombineMode, used for plotting plots the points on top of each other
  • Stack100, a value of the CombineMode, used for displaying the percentage value
  • GapLength, a property exposed by both CategoricalAxis and DateTimeContinuousAxis, which controls the distance between bar groups as percentage
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