I have a web service with a chart control which grabs an array of data and makes a line chart, then makes a moving average with the data according to a number you input. I want to be able to replace the moving data line while still keeping the original line underneath, just replacing the moving data information. I tried the following:
if (MyChart.Series.IndexOf("Series 2") != -1) { MyChart.Series["Series 2"].Points.Clear(); foreach (localhost.GraphData data in graph2) { S2.Points.AddXY(data.Date, data.Value); } } else { MyChart.Series.Add(S2); // A Series object contains DataPoint objects. The AddXY method adds a new DataPoint // to the Points collection (a DataPointCollection object). foreach (localhost.GraphData data in graph2) { S2.Points.AddXY(data.Date, data.Value); } }
010010111000100011100111100010101010