首页 > 代码库 > Devexpress web图表 柱状图 竖排
Devexpress web图表 柱状图 竖排
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图表 柱状图 竖排
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。