Dim Bar1 As BarSeries
Dim Bar2 As BarSeries
Dim Bar3 As BarSeries
Dim Chart As Chart
Chart = ChartServerControl1.Charts.GetAt(0)
' add the first bar
Bar1 = CType(Chart.Series.Add(SeriesType.Bar), BarSeries)
Bar1.Name = "Bar1"
Bar1.MultiBarMode = MultiBarMode.Series
' add the second bar
Bar2 = CType(Chart.Series.Add(SeriesType.Bar), BarSeries)
Bar2.Name = "Bar2"
Bar2.MultiBarMode = MultiBarMode.Stacked
' add the third bar
Bar3 = CType(Chart.Series.Add(SeriesType.Bar), BarSeries)
Bar3.Name = "Bar3"
Bar3.MultiBarMode = MultiBarMode.Stacked
' change the color of the second and third bars
Bar2.BarFillEffect.SetSolidColor(Color.Chocolate)
Bar3.BarFillEffect.SetSolidColor(Color.Bisque)
Bar1.DataLabels.Mode = DataLabelsMode.None
Bar2.DataLabels.Mode = DataLabelsMode.None
Bar3.DataLabels.Mode = DataLabelsMode.None
Bar1.BarStyle = BarStyle.Pyramid
Bar2.BarStyle = BarStyle.Pyramid
Bar3.BarStyle = BarStyle.Pyramid
Bar1.Values.FillRandomRange(5, 20, 100)
Bar2.Values.FillRandomRange(5, 20, 100)
Bar3.Values.FillRandomRange(5, 20, 100)
Chart.Wall(ChartWallType.Back).Visible = False
Chart.Wall(ChartWallType.Left).Visible = False
Chart.Chart3DView.SetPredefinedProjection(PredefinedProjection.OrthogonalHalf)