Back to Devexpress

SplineArea3DSeriesView Class

corelibraries-devexpress-dot-xtracharts-dot-splinearea3dseriesview.md

latest7.1 KB
Original Source

SplineArea3DSeriesView Class

Represents a series view of the 3D Spline Area type.

Namespace : DevExpress.XtraCharts

Assembly : DevExpress.XtraCharts.v25.2.dll

NuGet Package : DevExpress.Charts

Declaration

csharp
public class SplineArea3DSeriesView :
    Area3DSeriesView,
    ISplineSeriesView,
    ISplineView
vb
Public Class SplineArea3DSeriesView
    Inherits Area3DSeriesView
    Implements ISplineSeriesView,
               ISplineView

Remarks

The SplineArea3DSeriesView class provides the functionality of a series view of the 3D Spline Area type within a chart control.

In addition to the common view settings inherited from the base Area3DSeriesView class, the SplineArea3DSeriesView class declares the spline type specific settings, which allow you to define the style of the spline curve (SplineArea3DSeriesView.LineTensionPercent).

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 Spline Area type, refer to the Spline Area Chart topic.

Example

The following example demonstrates how to create a ChartControl with a series of the SplineArea3DSeriesView 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 SplineAreaChart3D = new ChartControl();

    // Add a spline area series to it.
    Series series1 = new Series("Series 1", ViewType.SplineArea3D);

    // Add points to the series.
    series1.Points.Add(new SeriesPoint("A", 12));
    series1.Points.Add(new SeriesPoint("B", 4));
    series1.Points.Add(new SeriesPoint("C", 17));
    series1.Points.Add(new SeriesPoint("D", 7));
    series1.Points.Add(new SeriesPoint("E", 12));
    series1.Points.Add(new SeriesPoint("F", 4));
    series1.Points.Add(new SeriesPoint("G", 17));
    series1.Points.Add(new SeriesPoint("H", 7));

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

    // Access labels of the series.
    ((Area3DSeriesLabel)series1.Label).Visible = true;
    ((Area3DSeriesLabel)series1.Label).ResolveOverlappingMode =
        ResolveOverlappingMode.Default;

    // Access another series options.
    series1.PointOptions.PointView = PointView.ArgumentAndValues;

    // Customize the view-type-specific properties of the series.
    SplineArea3DSeriesView myView = (SplineArea3DSeriesView)series1.View;
    myView.AreaWidth = 4;
    myView.LineTensionPercent = 50;

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

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

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

    ' Add a spline area series to it.
    Dim series1 As New Series("Series 1", ViewType.SplineArea3D)

    ' Add points to the series.
    series1.Points.Add(New SeriesPoint("A", 12))
    series1.Points.Add(New SeriesPoint("B", 4))
    series1.Points.Add(New SeriesPoint("C", 17))
    series1.Points.Add(New SeriesPoint("D", 7))
    series1.Points.Add(New SeriesPoint("E", 12))
    series1.Points.Add(New SeriesPoint("F", 4))
    series1.Points.Add(New SeriesPoint("G", 17))
    series1.Points.Add(New SeriesPoint("H", 7))

    ' Add both series to the chart.
    SplineAreaChart3D.Series.Add(series1)

    ' Access labels of the series.
    CType(series1.Label, Area3DSeriesLabel).Visible = True
    CType(series1.Label, Area3DSeriesLabel).ResolveOverlappingMode = _ 
        ResolveOverlappingMode.Default

    ' Access another series options.
    series1.PointOptions.PointView = PointView.ArgumentAndValues

    ' Customize the view-type-specific properties of the series.
    Dim myView As SplineArea3DSeriesView = CType(series1.View, SplineArea3DSeriesView)
    myView.AreaWidth = 4
    myView.LineTensionPercent = 50

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

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

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

Implements

IXtraSerializable

IXtraSupportDeserializeCollectionItem

ISupportTransparency

Inheritance

Object ChartElement SeriesViewBase XYDiagram3DSeriesViewBase Line3DSeriesView Area3DSeriesView SplineArea3DSeriesView

See Also

SplineArea3DSeriesView Members

DevExpress.XtraCharts Namespace