Skip to main content
A newer version of this page is available. .

Line3DSeriesView Class

Represents a series view of the 3D Line type.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v20.1.dll

NuGet Packages: DevExpress.Charts, DevExpress.WindowsDesktop.Charts

Declaration

public class Line3DSeriesView :
    XYDiagram3DSeriesViewBase,
    IGeometryStripCreator,
    IGeometryHolder

Remarks

The Line3DSeriesView class provides functionality of a series view of the Line 3D type within a chart control. At the same time, the Line3DSeriesView class serves as a base for the StepLine3DSeriesView class.

In addition to the common view settings inherited from the base XYDiagram3DSeriesViewBase class, the Line3DSeriesView class declares the line 3D type specific settings, which allow you to define the style of lines (Line3DSeriesView.LineThickness and Line3DSeriesView.LineWidth) and the settings of marker lines (Line3DSeriesView.MarkerLineColor, Line3DSeriesView.MarkerLineStyle and Line3DSeriesView.MarkerLineVisible).

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 line type, please see the Line Chart topic.

Example

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

    // Add a line series to it.
    Series series1 = new Series("Series 1", ViewType.Line3D);

    // 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.
    LineChart3D.Series.Add(series1);

    // Customize the view-type-specific properties of the series.
    Line3DSeriesView myView = (Line3DSeriesView)series1.View;
    myView.LineWidth = 5;
    myView.LineThickness = 4;

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

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

    // Add the chart to the form.
    LineChart3D.Dock = DockStyle.Fill;
    this.Controls.Add(LineChart3D);
}
See Also