Skip to main content

Area Chart

  • 3 minutes to read

Short Description

A Area3DSeriesView object is used to display the Area Chart. This chart type belongs to the Area Series Views type. This view is useful when you need to show trends for several series on the same diagram, and also show the relationship of the parts to the whole.

An Area chart is shown in the image below.

SeriesView_Area3DSeries.png

Chart Type Characteristics

The table below lists the main characteristics of this chart type.

Feature Value
Series View type Area3DSeriesView
Diagram type XYDiagram3D
Number of arguments per series point 1
Number of values per series point 1

Note

For information on which chart types can be combined with the Area Chart, refer to the following help topic: Combining Different Series Views.

Example

The following example creates a ChartControl with a series of the Area3DSeriesView type, sets its general properties, and adds this chart to a form at runtime. Before proceeding with this example, first create a Windows Forms Application in Visual Studio, and add all required assemblies to the project’s References list.

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 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);
}
See Also