Back to Devexpress

Area3DSeriesView Class

corelibraries-devexpress-dot-xtracharts-dot-area3dseriesview.md

latest6.3 KB
Original Source

Area3DSeriesView Class

Represents a series view of the 3D Area type.

Namespace : DevExpress.XtraCharts

Assembly : DevExpress.XtraCharts.v25.2.dll

NuGet Package : DevExpress.Charts

Declaration

csharp
public class Area3DSeriesView :
    Line3DSeriesView
vb
Public Class Area3DSeriesView
    Inherits Line3DSeriesView

Remarks

The Area3DSeriesView class provides functionality of a series view of the Area 3D type within a chart control. At the same time, the Area3DSeriesView class serves as a base for the StackedArea3DSeriesView and FullStackedArea3DSeriesView classes.

In addition to the common view settings inherited from the base Line3DSeriesView class, the Area3DSeriesView class declares the Area 3D type specific settings, which allow you to define the depth of a slice that represents the 3D area series (via the Area3DSeriesView.AreaWidth property).

Note that a particular view type can be defined for a series via its SeriesBase.View property.

For more information on series views of the 3D Area type, please see the Area Chart topic.

Example

The following example demonstrates how to create a ChartControl with a series of the Area3DSeriesView 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.

csharp
using System;
using System.Windows.Forms;
using DevExpress.XtraCharts;
// ...

private void Form1_Load(object sender, EventArgs e) {
    // Create a new chart.
    ChartControl areaChart3D = new ChartControl();

    // Add an area series to it.
    Series series1 = new Series("Series 1", ViewType.Area3D);

    // Add points to the series.
    series1.Points.Add(new SeriesPoint("A", 10));
    series1.Points.Add(new SeriesPoint("B", 2));
    series1.Points.Add(new SeriesPoint("C", 14));
    series1.Points.Add(new SeriesPoint("D", 7));

    // Add the series to the chart.
    areaChart3D.Series.Add(series1);

    // Customize the view-type-specific properties of the series.
    ((Area3DSeriesView)series1.View).AreaWidth = 5;

    // Access the diagram's options.
    ((XYDiagram3D)areaChart3D.Diagram).ZoomPercent = 110;

    // Add a title to the chart and hide the legend.
    ChartTitle chartTitle1 = new ChartTitle();
    chartTitle1.Text = "3D Area Chart";
    areaChart3D.Titles.Add(chartTitle1);
    areaChart3D.Legend.Visible = false;

    // Add the chart to the form.
    areaChart3D.Dock = DockStyle.Fill;
    this.Controls.Add(areaChart3D);
}
vb
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 areaChart3D As New ChartControl()

    ' Add an area series to it.
    Dim series1 As New Series("Series 1", ViewType.Area3D)

    ' Add points to the series.
    series1.Points.Add(New SeriesPoint("A", 10))
    series1.Points.Add(New SeriesPoint("B", 2))
    series1.Points.Add(New SeriesPoint("C", 14))
    series1.Points.Add(New SeriesPoint("D", 7))

    ' Add the series to the chart.
    areaChart3D.Series.Add(series1)

    ' Customize the view-type-specific properties of the series.
    CType(series1.View, Area3DSeriesView).AreaWidth = 5

    ' Access the diagram's options.
    CType(areaChart3D.Diagram, XYDiagram3D).ZoomPercent = 110

    ' Add a title to the chart and hide the legend.
    Dim chartTitle1 As New ChartTitle()
    chartTitle1.Text = "3D Area Chart"
    areaChart3D.Titles.Add(chartTitle1)
    areaChart3D.Legend.Visible = False

    ' Add the chart to the form.
    areaChart3D.Dock = DockStyle.Fill
    Me.Controls.Add(areaChart3D)
End Sub

Implements

IXtraSerializable

IXtraSupportDeserializeCollectionItem

ISupportTransparency

Inheritance

Show 13 items

Object ChartElement SeriesViewBase XYDiagram3DSeriesViewBase Line3DSeriesView Area3DSeriesView RangeArea3DSeriesView

SplineArea3DSeriesView

StackedArea3DSeriesView

StepArea3DSeriesView

StackedSplineArea3DSeriesView

FullStackedArea3DSeriesView

FullStackedSplineArea3DSeriesView

See Also

Area3DSeriesView Members

DevExpress.XtraCharts Namespace