i'm new of this forum. i want to make a chart with multiple chart area, every chart area has to be at the bottom of the previous one, i put my chart in a panel and i activate the autoscroll. but i saw the maximum size of Chart1.ChartAreas["ChartArea1" + i.ToString()].Position.Y is 100. my question is: how do i make multiple chart area in a column, every chartarea has to has a Height=50.
here my code:
public List<double> lista = new List<double>();
for (int i = 0; i < 5; i++)
{
Chart1.Series.Add("Series1" + i.ToString());
Chart1.ChartAreas.Add("ChartArea1" + i.ToString());
Chart1.Legends.Add("Legend1" + i.ToString());
Chart1.Series[i].ChartArea = "ChartArea1" + i.ToString();
Chart1.Series[i].ChartType = SeriesChartType.Spline;
Chart1.Series[i].BorderWidth = 2;
Chart1.ChartAreas["ChartArea1" + i.ToString()].AxisX.Title = "x";
Chart1.ChartAreas["ChartArea1" + i.ToString()].AxisY.Title = "y";
Chart1.ChartAreas["ChartArea1" + i.ToString()].Position.Auto = false; //customizare la posizione chartarea
Chart1.ChartAreas["ChartArea1" + i.ToString()].Position.X = 0; //posizione x
Chart1.ChartAreas["ChartArea1" + i.ToString()].Position.Y = 3 + 50 * i; //posizione y
Chart1.ChartAreas["ChartArea1" + i.ToString()].Position.Height = 40; //altezza
Chart1.ChartAreas["ChartArea1" + i.ToString()].Position.Width = 95; //larghezza
lista.Clear();
double numero;
for(int k = 0; k < 100; k++)
{
numero = Math.Cos(k) * Math.Sin(k);
lista.Add(numero);
}
foreach (var item in lista)
{
var index1 = Chart1.Series[i].Points.AddY(item);
}
}
i want to get something like in the picture
thanks for the help