您的位置:首页 > 数据库

DevExpress控件ChartControl制作饼图

2011-09-13 07:05 441 查看
string strSql ="";//数据库查询字符串;
DataTable dataInfo = TGlobals._CurrDbCmd.OpenSql_Table(strSql, "tableName");
Series Serices1 = new Series("Serices1 ", DevExpress.XtraCharts.ViewType.Pie3D);
chartControl1.Series.Add(Serices1);
Serices1.DataSource = dataInfo
Serices1.ArgumentScaleType = ScaleType.Qualitative;
Serices1.ArgumentDataMember = "列名1";
Serices1.ValueScaleType = ScaleType.Numerical;
Serices1.ValueDataMembers.AddRange(new string[] { "列名2" });
Serices1.PointOptions.PointView = PointView.ArgumentAndValues;
Serices1.PointOptions.ValueNumericOptions.Format = NumericFormat.Percent;
chartControl1.Visible = true;


 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  string 数据库 table
相关文章推荐