Skip to main content

StepLine3DSeriesView Class

Represents a series view of the 3D Step Line type.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v24.1.dll

NuGet Package: DevExpress.Charts

Declaration

[TypeConverter(typeof(StepLine3DSeriesViewTypeConverter))]
public class StepLine3DSeriesView :
    Line3DSeriesView,
    IStepSeriesView

Remarks

The StepLine3DSeriesView class provides functionality of a series view of the Step Line 3D type within a chart control.

In addition to the common line view settings inherited from the base Line3DSeriesView class, the StepLine3DSeriesView class declares a step line type specific setting, which allows you to control the manner in which step lines are drawn within the view (StepLine3DSeriesView.InvertedStep).

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

Example

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

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

    // 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 the series to the chart.
    StepLineChart3D.Series.Add(series1);

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

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

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

    // Access the diagram's options.
    ((XYDiagram3D)StepLineChart3D.Diagram).RuntimeRotation = true;
    ((XYDiagram3D)StepLineChart3D.Diagram).RotationType = 
        RotationType.UseMouseStandard;

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

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