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 | |
---|---|
|
C# | |
---|---|
// there is one chart created by default LineSeries line1 = (LineSeries)chart.Series.Add(SeriesType.Line); line1.MultiLineMode = MultiLineMode.Series; |
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 | |
---|---|
|
C# | |
---|---|
LineSeries line4 = (LineSeries)chart.Series.Add(SeriesType.Line); line4.MultiLineMode = MultiLineMode.Series; |
Related Examples
Windows Forms: Series\Line\Overlapped Line