private void predictButton_Click(object sender, EventArgs e) { chart2.Series["Total"].Points.Clear(); PredictUsage pu = new PredictUsage(); double[] totalMean = pu.TotalCalculations(eventsData); for (int i = 0; i < totalMean.Length; i++) { chart2.Series["Total"].Points.AddXY(i, totalMean[i]); } }
private void extraChart_Click(object sender, EventArgs e) { PredictUsageView2 newWindow = new PredictUsageView2(); newWindow.Owner = this; newWindow.ShowInTaskbar = false; newWindow.Show(); PredictUsage meanCal = new PredictUsage(); Tuple <double[], double[]> extraCals = meanCal.ExtraCalculations(eventsData); double[] appointMean = extraCals.Item1; double[] tasksMean = extraCals.Item2; for (int i = 0; i < 4; i++) { Console.WriteLine(appointMean[i]); newWindow.chart1.Series["Appointments"].Points.AddXY(i, appointMean[i]); newWindow.chart1.Series["Tasks"].Points.AddXY(i, tasksMean[i]); } }