DevExpress控件ChartControl制作饼图

            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)