コード例 #1
0
        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]);
            }
        }