corelibraries-devexpress-dot-xtracharts-dot-bar3dseriesview.md
Represents the base class for series views of the 3D Bar type.
Namespace : DevExpress.XtraCharts
Assembly : DevExpress.XtraCharts.v25.2.dll
NuGet Package : DevExpress.Charts
public abstract class Bar3DSeriesView :
SeriesView3DColorEachSupportBase,
IBarSeriesView
Public MustInherit Class Bar3DSeriesView
Inherits SeriesView3DColorEachSupportBase
Implements IBarSeriesView
The Bar3DSeriesView class serves as a base for the classes which provide functionality of 3D bar series within a chart control. Properties and methods which are defined by the Bar3DSeriesView class implement the base 3D bar series view functionality and are common to all 3D bar types of series views.
In addition to the common view settings inherited from the base SeriesView3DColorEachSupportBase class, the Bar3DSeriesView class declares the specific 3D bar type settings which allow you to define the view’s background filling style of bars (Bar3DSeriesView.FillStyle), specify the depth (Bar3DSeriesView.BarDepth) and width (Bar3DSeriesView.BarWidth) for the view’s bars.
For more information on series views of the 3D bar type please see the Bar Series Views topic.
The following example demonstrates how to create a ChartControl with two series of the Bar3DSeriesView type, set its general properties, and add this chart to a form at runtime. Before proceeding with this example, first create a Windows Forms Application in Visual Studio, and include all necessary assemblies to the References list of your project.
Then, add the following code to the Form.Load event handler.
using System;
using System.Windows.Forms;
using DevExpress.XtraCharts;
// ...
private void Form1_Load(object sender, EventArgs e) {
// Create a new chart.
ChartControl BarChart3D = new ChartControl();
// Add a bar series to it.
Series series1 = new Series("Series 1", ViewType.Bar3D);
Series series2 = new Series("Series 2", ViewType.Bar3D);
// Add points to the series.
series1.Points.Add(new SeriesPoint("A", 4));
series1.Points.Add(new SeriesPoint("B", 7));
series1.Points.Add(new SeriesPoint("C", 12));
series1.Points.Add(new SeriesPoint("D", 17));
series2.Points.Add(new SeriesPoint("A", 9));
series2.Points.Add(new SeriesPoint("B", 11));
series2.Points.Add(new SeriesPoint("C", 15));
series2.Points.Add(new SeriesPoint("D", 23));
// Add both series to the chart.
BarChart3D.Series.AddRange(new Series[] { series1, series2 });
// Access labels of the first series.
((BarSeriesLabel)series1.Label).Visible = true;
((BarSeriesLabel)series1.Label).ResolveOverlappingMode =
ResolveOverlappingMode.Default;
// Access the series options.
series1.PointOptions.PointView = PointView.ArgumentAndValues;
// Customize the view-type-specific properties of the series.
Bar3DSeriesView myView = (Bar3DSeriesView)series1.View;
myView.BarDepthAuto = false;
myView.BarDepth = 1;
myView.BarWidth = 1;
myView.Transparency = 80;
// Access the diagram's options.
((XYDiagram3D)BarChart3D.Diagram).ZoomPercent = 110;
// Add a title to the chart and hide the legend.
ChartTitle chartTitle1 = new ChartTitle();
chartTitle1.Text = "3D Side-by-Side Bar Chart";
BarChart3D.Titles.Add(chartTitle1);
BarChart3D.Legend.Visible = false;
// Add the chart to the form.
BarChart3D.Dock = DockStyle.Fill;
this.Controls.Add(BarChart3D);
}
Imports System
Imports System.Windows.Forms
Imports DevExpress.XtraCharts
' ...
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
' Create a new chart.
Dim BarChart3D As New ChartControl()
' Add a bar series to it.
Dim series1 As New Series("Series 1", ViewType.Bar3D)
Dim series2 As New Series("Series 2", ViewType.Bar3D)
' Add points to the series.
series1.Points.Add(New SeriesPoint("A", 4))
series1.Points.Add(New SeriesPoint("B", 7))
series1.Points.Add(New SeriesPoint("C", 12))
series1.Points.Add(New SeriesPoint("D", 17))
series2.Points.Add(New SeriesPoint("A", 9))
series2.Points.Add(New SeriesPoint("B", 11))
series2.Points.Add(New SeriesPoint("C", 15))
series2.Points.Add(New SeriesPoint("D", 23))
' Add both series to the chart.
BarChart3D.Series.AddRange(New Series() { series1, series2 })
' Access labels of the first series.
CType(series1.Label, BarSeriesLabel).Visible = True
CType(series1.Label, BarSeriesLabel).ResolveOverlappingMode = _
ResolveOverlappingMode.Default
' Access the series options.
series1.PointOptions.PointView = PointView.ArgumentAndValues
' Customize the view-type-specific properties of the series.
Dim myView As Bar3DSeriesView = CType(series1.View, Bar3DSeriesView)
myView.BarDepthAuto = False
myView.BarDepth = 1
myView.BarWidth = 1
myView.Transparency = 80
' Access the diagram's options.
CType(BarChart3D.Diagram, XYDiagram3D).ZoomPercent = 110
' Add a title to the chart and hide the legend.
Dim chartTitle1 As New ChartTitle()
chartTitle1.Text = "3D Side-by-Side Bar Chart"
BarChart3D.Titles.Add(chartTitle1)
BarChart3D.Legend.Visible = False
' Add the chart to the form.
BarChart3D.Dock = DockStyle.Fill
Me.Controls.Add(BarChart3D)
End Sub
IXtraSupportDeserializeCollectionItem
Show 12 items
Object ChartElement SeriesViewBase XYDiagram3DSeriesViewBase SeriesView3DColorEachSupportBase Bar3DSeriesView ManhattanBarSeriesView
SideBySideFullStackedBar3DSeriesView
SideBySideStackedBar3DSeriesView
See Also