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;
DevExpress控件ChartControl制作饼图
最新推荐文章于 2023-09-26 14:12:05 发布