Xceed Chart for WinForms v4.4 Documentation
Overlapped Line

Welcome to Xceed Chart for WinForms v4.4 > User Guide > Series > XY Scatter Series > Line Series > Overlapped Line

Overlapped line series are created by using several instances of the LineSeries class. The first created line series must have its MultiLineMode property set to Series. The MultiLineMode property of the subsequent line series must be set to Overlapped. Overlapped line series are displayed in the same depth space. The following figure shows a typical overlapped line chart: 



figure 1.

Creating the Overlapped Line Series

The following example demonstrates how to create an overlapped line chart with two lines:

VB.NET  

' there is one chart created by default

Dim chart As Chart = CType(chartControl1.Charts(0), Chart)

 

Dim line1 As LineSeries = CType(chart.Series.Add(SeriesType.Line), LineSeries)

Dim line2 As LineSeries = CType(chart.Series.Add(SeriesType.Line), LineSeries)

 

line1.MultiLineMode = MultiLineMode.Series 

line2.MultiLineMode = MultiLineMode.Overlapped

C#  
// there is one chart created by default
Chart chart = (Chart)chartControl1.Charts[0];
LineSeries line1 = (LineSeries)chart.Series.Add(SeriesType.Line);
LineSeries line2 = (LineSeries)chart.Series.Add(SeriesType.Line);
line1.MultiLineMode = MultiLineMode.Series;
line2.MultiLineMode = MultiLineMode.Overlapped;

If you want to create a second overlapped line with two lines behind the overlapped line created in the previous sample, you must add the following code:

VB.NET  

Dim line4 As LineSeries = CType(chart.Series.Add(SeriesType.Line), LineSeries)

Dim line5 As LineSeries = CType(chart.Series.Add(SeriesType.Line), LineSeries)

 

line4.MultiLineMode = MultiLineMode.Series

line5.MultiLineMode = MultiLineMode.Overlapped

C#  
LineSeries line4 = (LineSeries)chart.Series.Add(SeriesType.Line);
LineSeries line5 = (LineSeries)chart.Series.Add(SeriesType.Line);
line4.MultiLineMode = MultiLineMode.Series;
line5.MultiLineMode = MultiLineMode.Overlapped;

Related Examples

Windows Forms: Series\Line\Overlapped Line

See Also

LineSeries