using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FlexPieQuickStart
{
class DataCreator
{
public static List<FruitDataItem> CreateFruit()
{
var fruits = new string[] { "オレンジ ", "りんご", "梨", "バナナ" };
var count = fruits.Length;
var result = new List<FruitDataItem>();
var rnd = new Random();
for (var i = 0; i < count; i++)
result.Add(new FruitDataItem()
{
Fruit = fruits[i],
March = rnd.Next(20),
April = rnd.Next(20),
May = rnd.Next(20),
});
return result;
}
}
public class FruitDataItem
{
public string Fruit { get; set; }
public double March { get; set; }
public double April { get; set; }
public double May { get; set; }
}
}