private void IU_Grafica_Load(object sender, EventArgs e) { ControladorPizzza objGrafica = new ControladorPizzza(); this.chart1.Palette = ChartColorPalette.SeaGreen; this.chart1.Titles.Add("Ingresos totales"); if (objGrafica.TraerGrafica().Rows.Count > 0) { for (int i = 0; i < objGrafica.TraerGrafica().Rows.Count; i++) { DR = objGrafica.TraerGrafica().Rows[i]; Series series = this.chart1.Series.Add(DR.ItemArray[0].ToString()); series.Points.Add(Convert.ToDouble(DR.ItemArray[1])); } } }