Back to Devexpress

FullStackedLineSeriesView Class

corelibraries-devexpress-dot-xtracharts-32b1290f.md

latest8.6 KB
Original Source

FullStackedLineSeriesView Class

A series view of the Full-Stacked Line type.

Namespace : DevExpress.XtraCharts

Assembly : DevExpress.XtraCharts.v25.2.dll

NuGet Package : DevExpress.Charts

Declaration

csharp
public class FullStackedLineSeriesView :
    StackedLineSeriesView
vb
Public Class FullStackedLineSeriesView
    Inherits StackedLineSeriesView

Remarks

The FullStackedLineSeriesView class provides the functionality of a series view of the Full-Stacked Line type within a chart control.

The FullStackedLineSeriesView class inherits properties and methods from the base StackedLineSeriesView class which defines the common settings of the stacked line series views.

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

Example

The following example demonstrates how to create a ChartControl with a series of the FullStackedLineSeriesView type, and add this chart to a form at runtime. Before proceeding with this example, create a Windows Forms Application in Visual Studio, and add all required 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;

namespace FullStackedLineChart {
    public partial class Form1 : Form {
        public Form1() {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e) {

            // Create a new chart.
            ChartControl fullStackedLineChart = new ChartControl();

            // Create two full-stacked line series.
            Series series1 = new Series("Series 1", ViewType.FullStackedLine);
            Series series2 = new Series("Series 2", ViewType.FullStackedLine);

            // Add points to them.
            series1.Points.Add(new SeriesPoint(new DateTime(1997, 1, 11), 10));
            series1.Points.Add(new SeriesPoint(new DateTime(1999, 1, 11), 962));
            series1.Points.Add(new SeriesPoint(new DateTime(2001, 1, 11), 18832));
            series1.Points.Add(new SeriesPoint(new DateTime(2003, 1, 11), 264332));
            series1.Points.Add(new SeriesPoint(new DateTime(2005, 1, 11), 1112753));
            series1.Points.Add(new SeriesPoint(new DateTime(2007, 1, 11), 4169758));

            series2.Points.Add(new SeriesPoint(new DateTime(1997, 1, 11), 391));
            series2.Points.Add(new SeriesPoint(new DateTime(1999, 1, 11), 4082));
            series2.Points.Add(new SeriesPoint(new DateTime(2001, 1, 11), 21932));
            series2.Points.Add(new SeriesPoint(new DateTime(2003, 1, 11), 64195));
            series2.Points.Add(new SeriesPoint(new DateTime(2005, 1, 11), 78473));
            series2.Points.Add(new SeriesPoint(new DateTime(2007, 1, 11), 101830));

            // Add both series to the chart.
            fullStackedLineChart.Series.AddRange(new Series[] { series1, series2 });

            // Access the type-specific options of the diagram.
            ((XYDiagram)fullStackedLineChart.Diagram).EnableAxisXZooming = true;
            ((XYDiagram)fullStackedLineChart.Diagram).AxisY.Label.TextPattern = "{VP:P0}";

            // Hide the legend (if necessary).
            fullStackedLineChart.Legend.Visible = false;

            // Add a title to the chart (if necessary).
            fullStackedLineChart.Titles.Add(new ChartTitle());
            fullStackedLineChart.Titles[0].Text = "Full Stacked Line Chart";

            // Add the chart to the form.
            fullStackedLineChart.Dock = DockStyle.Fill;
            this.Controls.Add(fullStackedLineChart);
        }
    }
}
vb
Imports Microsoft.VisualBasic
Imports System
Imports System.Windows.Forms
Imports DevExpress.XtraCharts

Namespace FullStackedLineChart
    Partial Public Class Form1
        Inherits Form
        Public Sub New()
            InitializeComponent()
        End Sub

        Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load

            ' Create a new chart.
            Dim fullStackedLineChart As New ChartControl()

            ' Create two full-stacked line series.
            Dim series1 As New Series("Series 1", ViewType.FullStackedLine)
            Dim series2 As New Series("Series 2", ViewType.FullStackedLine)

            ' Add points to them.
            series1.Points.Add(New SeriesPoint(New DateTime(1997, 1, 11), 10))
            series1.Points.Add(New SeriesPoint(New DateTime(1999, 1, 11), 962))
            series1.Points.Add(New SeriesPoint(New DateTime(2001, 1, 11), 18832))
            series1.Points.Add(New SeriesPoint(New DateTime(2003, 1, 11), 264332))
            series1.Points.Add(New SeriesPoint(New DateTime(2005, 1, 11), 1112753))
            series1.Points.Add(New SeriesPoint(New DateTime(2007, 1, 11), 4169758))

            series2.Points.Add(New SeriesPoint(New DateTime(1997, 1, 11), 391))
            series2.Points.Add(New SeriesPoint(New DateTime(1999, 1, 11), 4082))
            series2.Points.Add(New SeriesPoint(New DateTime(2001, 1, 11), 21932))
            series2.Points.Add(New SeriesPoint(New DateTime(2003, 1, 11), 64195))
            series2.Points.Add(New SeriesPoint(New DateTime(2005, 1, 11), 78473))
            series2.Points.Add(New SeriesPoint(New DateTime(2007, 1, 11), 101830))

            ' Add both series to the chart.
            fullStackedLineChart.Series.AddRange(New Series() { series1, series2 })

            ' Access the type-specific options of the diagram.
            CType(fullStackedLineChart.Diagram, XYDiagram).EnableAxisXZooming = True
            CType(fullStackedLineChart.Diagram, XYDiagram).AxisY.Label.TextPattern = "{VP:P0}"

            ' Hide the legend (if necessary).
            fullStackedLineChart.Legend.Visible = False

            ' Add a title to the chart (if necessary).
            fullStackedLineChart.Titles.Add(New ChartTitle())
            fullStackedLineChart.Titles(0).Text = "Full Stacked Line Chart"

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

Implements

IXtraSerializable

IXYSeriesView2D

IXtraSupportDeserializeCollectionItem

Inheritance

Show 11 items

Object ChartElement SeriesViewBase XYDiagram2DSeriesViewBase XYDiagramSeriesViewBase SeriesViewColorEachSupportBase PointSeriesViewBase PointSeriesView LineSeriesView StackedLineSeriesView FullStackedLineSeriesView

See Also

FullStackedLineSeriesView Members

DevExpress.XtraCharts Namespace