double GetAverageValue(DataSetContainer <DateTimeData> data)
        {
            double result = 0;

            foreach (DateTimeData res in data.DataSet)
            {
                result += res.Value;
            }
            return(result / data.DataSet.Count);
        }
        void GenerateData()
        {
            int year = DateTime.Now.Year;

            seriesData.DataSets = new List <DataSetContainer <DateTimeData> >();
            for (int i = 0; i < names.Length; i++)
            {
                List <DateTimeData> data = new List <DateTimeData>();
                for (int j = 0; j < values[i].Length; j++)
                {
                    data.Add(new DateTimeData(new DateTime(year - values[i].Length + j, 1, 1), values[i][j]));
                }
                var dataContainer = new DataSetContainer <DateTimeData>()
                {
                    Name = names[i], DataSet = data
                };
                seriesData.DataSets.Add(dataContainer);
            }
        }