How to add two different type series to C# chart?
<p>I have nice working chart with stock typed graph. When I tried to add line typed series to this chartarea I got big red X.</p>

<pre><code>Series ser = new Series(seriesName);
ser.ChartArea = "Default";
ser.Name = seriesName;
ser.ChartType=SeriesChartType.Line;
ser.Points.AddXY(1, 1);
ser.Points.AddXY(1, 2);
chart1.Series.Add(ser);
</code></pre>

<p>Is it possible to add different types of series in one chartarea?</p>

<p><strong>EDIT</strong></p>

<p>I tried to apply changes in accordance with the proposal of TaW, but still get same error.</p>

<pre><code>string seriesName =  dataGridView1.Rows[rowSelected].Cells[0].Value + "_" + curPeriod + "_" +"line" +dataPoints.Length;
Series ser = new Series(seriesName);
chart1.Series.Add(ser);
chart1.Series[seriesName].ChartArea = chart1.ChartAreas[0].Name;
chart1.Series[seriesName].ChartType = SeriesChartType.Line;
chart1.Series[seriesName].Points.AddXY(1, 1);
chart1.Series[seriesName].Points.AddXY(1, 2);
</code></pre>

<p>Here is initialization of my chart.</p>

<pre><code>chart1.ChartAreas.Add(new ChartArea("Default"));
chart1.Series.Add(new Series("Series1"));
chart1.ChartAreas.Add(new ChartArea("Option"));
chart1.Series.Add(new Series("Series2"));
chart1.Series.Add(new Series("Series3"));
chart1.Series["Series2"].ChartArea = "Option";
chart1.Series["Series3"].ChartArea = "Option";
chart1.Series["Series1"].ChartArea = "Default";
chart1.Series["Series1"].ChartType = SeriesChartType.Stock;
chart1.Series["Series2"].ChartType = SeriesChartType.Line;
chart1.Series["Series3"].ChartType = SeriesChartType.Line;
chart1.Series["Series1"].BorderColor = Color.Green;
chart1.Series["Series1"].Color = Color.GreenYellow;
chart1.Series["Series2"].Color = Properties.Settings.Default.InnerPrice;
chart1.Series["Series3"].Color = Properties.Settings.Default.TemporaryPrice;
chart1.Series["Series1"]["PriceUpColor"] = "Red";
chart1.Series["Series1"]["PriceDownColor"] = "Yellow";
chart1.Series["Series1"].IsXValueIndexed = true;
chart1.Series["Series2"].IsXValueIndexed = false;
chart1.Series["Series3"].IsXValueIndexed = false;
chart1.Series["Series1"].XValueType = ChartValueType.DateTime;
</code></pre>

<p><a href="https://i.stack.imgur.com/haRLw.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/haRLw.jpg" alt="Screen of working chart"></a>
May be somebody can help. I need to draw lines in chart!Thanks in advance!</p>