码迷,mamicode.com
首页 > 其他好文 > 详细

Dev 柱状图

时间:2015-04-01 13:13:37      阅读:132      评论:0      收藏:0      [点我收藏+]

标签:

通过构造函数,把值传递过来

1   public XtraInterpreterChartForm(object ds)
2         {
3             InitializeComponent();
4             datasource = ds;
5         }

设置形状,数据等:

 1  // Create a pie series.
 2             Series series1 = new Series("Bar Series 1", ViewType.Bar);
 3             chartControl1.Series.Add(series1);
 4             chartControl1.DataSource = datasource;
 5 
 6             // Adjust the value numeric options of the series.
 7             series1.ArgumentDataMember = "Username";
 8             series1.ValueDataMembers.AddRange(new string[] { "WordCount" });
 9 
10             ((BarSeriesView)series1.View).ColorEach = true;
11             series1.LegendPointOptions.Pattern = "{A}";
12 
13             // Add a title to the chart and hide the legend.
14             ChartTitle chartTitle1 = new ChartTitle {Text = "译员剩余字数信息"};
15             chartControl1.Titles.Add(chartTitle1);
16             chartControl1.Legend.Visible = true;
17 
18             // Add the chart to the form.
19             chartControl1.Dock = DockStyle.Fill;
20             Controls.Add(chartControl1);

技术分享

Dev 柱状图

标签:

原文地址:http://www.cnblogs.com/QQ931697811/p/4383309.html

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