public static Series MeterReadingsToPieChart(IEnumerable<Dictionary<string, double>> readings)
{
object[] points = ? // I dont know how can I create this array from readings.
Series series = new Series
{
Type = ChartTypes.Pie,
Name = "",
Data = new Data(points)
};
return series;
}
我想从上面的代码动态创建以下
Series series = new Series
{
Type = ChartTypes.Pie,
Name = "",
Data = new Data(new object[]
{
new object[] { "Gaziemir", 45.0 },
new object[] { "Bornova", 26.8 },
new object[] { "Forum Bornova", 8.5 }
})
};
你能给出一个起点吗?
谢谢