0
flowlayoutpanel에서 차트를 컨트롤로 추가하려고하지만 모든 차트를 실행 한 후에이 문제를 해결하는 방법이 비어있는 것처럼 보입니까? 여기 내 코드는차트가 FlowLayoutPanel에 표시되지 않습니까?
flowLayoutPanel1.Controls.Clear();
System.Windows.Forms.DataVisualization.Charting.Series Series = new Series();
Chart[] chartMensal = new Chart[12];
for (int i = 1; i <= 12; i++)
{
string[] seriesArray = { "Total Contrato", "Total Vendas", "Total Despeses" };
Double[] pointsArray = { 1000, 1500, 500 };
chartMensal[i] = new Chart();
chartMensal[i].Width = this.Width - 100;
chartMensal[i].Height = 200;
chartMensal[i].Titles.Add(CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(i).ToUpper());
chartMensal[i].Palette = ChartColorPalette.Fire;
chartMensal[i].Series.Clear();
Series.Points.Clear();
for (int t = 0; t < seriesArray.Length; t++)
{
Series.Points.Add(pointsArray[t]);
Series = chartMensal[i].Series.Add(seriesArray[t]);
}
chartMensal[i].Visible = true;
flowLayoutPanel1.Controls.Add(chartMensal[i]);
}
chartMensal [i] .Update() 또는 flowLayoutPanel1.Update()를 시도 했습니까? – benJima
예 (하지만 같음)가 비어 있습니다. – Saqi
BTW : 첫 번째 루프에 대한 12까지 Count 및 OutOfBoundsException 발생합니다 ... 나는 당신이 차트 영역이없는 것 같아요. – benJima