首页 > 其他 > 详细

Dev 柱状图

时间:2015-04-01 13:10:44      阅读:226      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!