标签:view series rom unit height item sum dev div
1 var lookup = list.ToLookup(x => x.FULLNAME); 2 if (lookup.Count > 0) 3 { 4 webChartControl.Height = new Unit(lookup.Count * 200); 5 } 6 XYDiagram diagram = (XYDiagram)webChartControl.Diagram; 7 diagram.DefaultPane.Visible = false; 8 int i = 0; 9 foreach (var item in lookup) 10 { 11 var pane = new XYDiagramPane(); 12 diagram.Panes.Add(pane); 13 var temp = webChartControl.Series[0].Clone() as Series; 14 15 var view = temp.View as SideBySideBarSeriesView; 16 17 view.Pane = pane; 18 var sums = from l in item group l by l.SPENT_ON into g select new { SPENT_ON = g.Key, HOURS = g.Sum(x => x.HOURS) }; 19 temp.DataSource = sums; 20 temp.LegendText = item.Key; 21 webChartControl.Series.Add(temp); 22 23 }
标签:view series rom unit height item sum dev div
原文地址:http://www.cnblogs.com/iaisoft/p/6346923.html