Cluster Bar charts are displayed with several NBarSeries or NFloatBarSeries objects. The MultiBarMode property of the first bar series must be set to MultiBarMode.Series. For the subsequent series the MultiBarMode property must be set to MultiBarMode.Clustered. The following example demonstrates how to create a cluster bar chart with two series:
C# |
Copy Code
|
---|---|
// obtain a reference to the Cartesian chart that is created by default
NCartesianChart chart = (NCartesianChart)chartControl.Charts[0];
NBarSeries bar1 = (NBarSeries)chart.Series.Add(SeriesType.Bar);
NBarSeries bar2 = (NBarSeries)chart.Series.Add(SeriesType.Bar);
bar1.MultiBarMode = MultiBarMode.Series;
bar2.MultiBarMode = MultiBarMode.Clustered;
|
Visual Basic |
Copy Code
|
---|---|
' obtain a reference to the Cartesian chart that is created by default Dim chart As NCartesianChart = chartControl.Charts(0) Dim bar1 As NBarSeries = chart.Series.Add(SeriesType.Bar) Dim bar2 As NBarSeries = chart.Series.Add(SeriesType.Bar) bar1.MultiBarMode = MultiBarMode.Series bar2.MultiBarMode = MultiBarMode.Clustered |