码迷,mamicode.com
首页 > Web开发 > 详细

Devexpress web图表 柱状图 竖排

时间:2017-01-24 14:48:03      阅读:227      评论:0      收藏:0      [点我收藏+]

标签: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             }

 

Devexpress web图表 柱状图 竖排

标签:view   series   rom   unit   height   item   sum   dev   div   

原文地址:http://www.cnblogs.com/iaisoft/p/6346923.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!