|
|
@@ -933,7 +933,7 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
|
|
|
/// </summary>
|
|
|
/// <param name="a_pieSeriesClass">大分类</param>
|
|
|
/// <param name="a_pieSeries">小分类</param>
|
|
|
- public void setParticleSizeTable(bool a_pieSeriesClass, bool a_pieSeries, bool isStacking)
|
|
|
+ public void setParticleSizeTable(c_TemplateClass m_mbszclass)
|
|
|
{
|
|
|
//if (m_ReportApp.m_RptConfigFile.Systype != OTS_SysType_ID.IncA)
|
|
|
|
|
|
@@ -1002,18 +1002,48 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
|
|
|
}
|
|
|
|
|
|
|
|
|
- if (isStacking)
|
|
|
+ if (m_mbszclass.M_KLFXJG.b_ck_klcc_xsddt)
|
|
|
{
|
|
|
HistogramChart(particleList);
|
|
|
}
|
|
|
|
|
|
- if (a_pieSeriesClass || a_pieSeries)
|
|
|
+ if (m_mbszclass.M_KLFXJG.b_ck_klcc_dfl || m_mbszclass.M_KLFXJG.b_ck_klcc_xfl)
|
|
|
{
|
|
|
XRPageBreak();
|
|
|
}
|
|
|
xrChart_ParticelSizeCalss.Visible = false;
|
|
|
- #region 大分类chart图
|
|
|
- if (a_pieSeriesClass&& chartmax.Rows.Count>0)
|
|
|
+
|
|
|
+ ViewType viewType;
|
|
|
+ DefaultBoolean VisDefaultBoolean;
|
|
|
+ string Pat;
|
|
|
+ string CPat;
|
|
|
+ if (m_mbszclass.M_KLFXJG.ParticleSizeGraphicSelection==0)
|
|
|
+ {
|
|
|
+ viewType = ViewType.Pie;
|
|
|
+ Pat = "{A}";
|
|
|
+ CPat = "{A}";
|
|
|
+ VisDefaultBoolean = DefaultBoolean.True;
|
|
|
+ }
|
|
|
+ else if(m_mbszclass.M_KLFXJG.ParticleSizeGraphicSelection == 1)
|
|
|
+ {
|
|
|
+ viewType = ViewType.Bar;
|
|
|
+ Pat = "{V}";
|
|
|
+ CPat = "{V}";
|
|
|
+ VisDefaultBoolean = DefaultBoolean.False;
|
|
|
+ }
|
|
|
+ else /*if (m_mbszclass.M_KLFXJG.ParticleSizeGraphicSelection == 2)*/
|
|
|
+ {
|
|
|
+ viewType = ViewType.Line;
|
|
|
+ Pat = "{V}";
|
|
|
+ CPat = "{V}";
|
|
|
+ VisDefaultBoolean = DefaultBoolean.False;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ #region 大分类chart图
|
|
|
+ if (m_mbszclass.M_KLFXJG.b_ck_klcc_dfl && chartmax.Rows.Count>0)
|
|
|
{
|
|
|
xrChart_ParticelSizeCalss.Visible = true;
|
|
|
xrLabel_size_IconQuestion_Class.Visible = true;
|
|
|
@@ -1021,29 +1051,23 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
|
|
|
NeueStartposition = xrLabel_size_IconQuestion_Class.LocationF.Y + xrLabel_size_IconQuestion_Class.SizeF.Height + 10;
|
|
|
|
|
|
// 实例化饼图对象
|
|
|
- Series pieSeriesClass = new Series("尺寸分类", ViewType.Pie);
|
|
|
- pieSeriesClass.ArgumentScaleType = ScaleType.Qualitative;
|
|
|
- // 项目名称
|
|
|
- pieSeriesClass.ArgumentDataMember = "name";
|
|
|
- pieSeriesClass.ValueScaleType = ScaleType.Numerical;
|
|
|
- //取值字段
|
|
|
- pieSeriesClass.ValueDataMembers.AddRange(new string[] { "quantity" });
|
|
|
- (pieSeriesClass.Label as PieSeriesLabel).Position = PieSeriesLabelPosition.Inside;
|
|
|
-
|
|
|
- //设置数据源
|
|
|
- pieSeriesClass.DataSource = chartmax;
|
|
|
- pieSeriesClass.LabelsVisibility = DevExpress.Utils.DefaultBoolean.False;
|
|
|
+ Series pieSeriesClass = new Series("尺寸分类", viewType);
|
|
|
|
|
|
- pieSeriesClass.Label.TextPattern = "{A}";
|
|
|
- // 饼图空间添加 新建的饼图对象
|
|
|
+ for (int i=0;i< chartmax.Rows.Count;i++)
|
|
|
+ {
|
|
|
+ string name = chartmax.Rows[i]["name"].ToString();
|
|
|
+ double Cunt = Convert.ToDouble(chartmax.Rows[i]["quantity"]);
|
|
|
+ pieSeriesClass.Points.Add(new SeriesPoint(name, Cunt));
|
|
|
+ }
|
|
|
+ pieSeriesClass.LabelsVisibility = DefaultBoolean.True;
|
|
|
+ pieSeriesClass.Label.TextPattern = Pat;
|
|
|
+ if(m_mbszclass.M_KLFXJG.ParticleSizeGraphicSelection == 0)
|
|
|
+ {
|
|
|
+ pieSeriesClass.LabelsVisibility = DefaultBoolean.False;
|
|
|
+ }
|
|
|
xrChart_ParticelSizeCalss.Series.Add(pieSeriesClass);
|
|
|
-
|
|
|
-
|
|
|
- //右上角分组视图
|
|
|
- this.xrChart_ParticelSizeCalss.Legend.MarkerSize = new System.Drawing.Size(20, 20);
|
|
|
- this.xrChart_ParticelSizeCalss.Legend.TextOffset = 5;
|
|
|
- this.xrChart_ParticelSizeCalss.Legend.VerticalIndent = 5;
|
|
|
- this.xrChart_ParticelSizeCalss.Legend.Border.Color = Color.Red;//红色边框
|
|
|
+ xrChart_ParticelSizeCalss.Legend.Visibility = VisDefaultBoolean;
|
|
|
+
|
|
|
xrChart_ParticelSizeCalss.LocationF = new PointF(30f, NeueStartposition);
|
|
|
NeueStartposition = xrChart_ParticelSizeCalss.LocationF.Y + xrChart_ParticelSizeCalss.SizeF.Height+1 ;
|
|
|
}
|
|
|
@@ -1051,7 +1075,7 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
|
|
|
#region 细分chart图
|
|
|
|
|
|
xrChart_ParticelSizeSubdivision.Visible = false;
|
|
|
- if (a_pieSeries && surface_dt2.Rows.Count>0)
|
|
|
+ if (m_mbszclass.M_KLFXJG.b_ck_klcc_xfl && surface_dt2.Rows.Count>0)
|
|
|
{
|
|
|
DataTable data = surface_dt2.Clone();
|
|
|
for (int i=0;i< surface_dt2.Rows.Count;i++)
|
|
|
@@ -1068,31 +1092,24 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
|
|
|
xrLabel_size_IconQuestion_Subdivision.Visible = true;
|
|
|
xrLabel_size_IconQuestion_Subdivision.LocationF = new PointF(xrLabel_size_IconQuestion_Subdivision.LocationF.X, NeueStartposition);
|
|
|
NeueStartposition = xrLabel_size_IconQuestion_Subdivision.LocationF.Y + xrLabel_size_IconQuestion_Subdivision.SizeF.Height + 1;
|
|
|
- // 实例化饼图对象
|
|
|
- Series pieSeries = new Series("颗粒尺寸细化分类", ViewType.Pie);
|
|
|
- pieSeries.ArgumentScaleType = ScaleType.Qualitative;
|
|
|
- // 项目名称
|
|
|
- pieSeries.ArgumentDataMember = "Name";
|
|
|
- pieSeries.ValueScaleType = ScaleType.Numerical;
|
|
|
- //取值字段
|
|
|
- pieSeries.ValueDataMembers.AddRange(new string[] { "total" });
|
|
|
- (pieSeries.Label as PieSeriesLabel).Position = PieSeriesLabelPosition.Inside;
|
|
|
- //显示百分比
|
|
|
- //pieSeries.PointOptions.PointView = PointView.ArgumentAndValues;
|
|
|
- //pieSeries.PointOptions.ValueNumericOptions.Format = NumericFormat.Percent;
|
|
|
- //设置数据源
|
|
|
- pieSeries.DataSource = dt_subdivde_dt;
|
|
|
- pieSeries.LabelsVisibility = DevExpress.Utils.DefaultBoolean.False;
|
|
|
- // 饼图空间添加 新建的饼图对象
|
|
|
-
|
|
|
-
|
|
|
- pieSeries.Label.TextPattern = "{A}";
|
|
|
+
|
|
|
+ Series pieSeries = new Series("颗粒尺寸细化分类", viewType);
|
|
|
+
|
|
|
+ for (int i = 0; i < dt_subdivde_dt.Rows.Count; i++)
|
|
|
+ {
|
|
|
+ string name = dt_subdivde_dt.Rows[i]["name"].ToString();
|
|
|
+ double Cunt = Convert.ToDouble(dt_subdivde_dt.Rows[i]["total"]);
|
|
|
+ pieSeries.Points.Add(new SeriesPoint(name, Cunt));
|
|
|
+ }
|
|
|
+ pieSeries.LabelsVisibility = DefaultBoolean.True;
|
|
|
+ pieSeries.Label.TextPattern = CPat;
|
|
|
+ if (m_mbszclass.M_KLFXJG.ParticleSizeGraphicSelection == 0)
|
|
|
+ {
|
|
|
+ pieSeries.LabelsVisibility = DefaultBoolean.False;
|
|
|
+ }
|
|
|
xrChart_ParticelSizeSubdivision.Series.Add(pieSeries);
|
|
|
- //右上角分组视图
|
|
|
- this.xrChart_ParticelSizeSubdivision.Legend.MarkerSize = new System.Drawing.Size(20, 20);
|
|
|
- this.xrChart_ParticelSizeSubdivision.Legend.TextOffset = 5;
|
|
|
- this.xrChart_ParticelSizeSubdivision.Legend.VerticalIndent = 5;
|
|
|
- this.xrChart_ParticelSizeSubdivision.Legend.Border.Color = Color.Red;//红色边框
|
|
|
+ xrChart_ParticelSizeSubdivision.Legend.Visibility = VisDefaultBoolean;
|
|
|
+
|
|
|
xrChart_ParticelSizeSubdivision.LocationF = new PointF(30f, NeueStartposition);
|
|
|
NeueStartposition = xrChart_ParticelSizeSubdivision.LocationF.Y + xrChart_ParticelSizeSubdivision.SizeF.Height + 10;
|
|
|
}
|
|
|
@@ -1487,123 +1504,222 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
|
|
|
/// 设置插入夹杂物面积比图像
|
|
|
/// </summary>
|
|
|
/// <param name="TemplateClass"></param>
|
|
|
- public void set_incaPIC_classify()
|
|
|
+ public void set_incaPIC_classify(c_TemplateClass m_mbszclass)
|
|
|
{
|
|
|
- InclusionProportion inclusionProportion = new InclusionProportion();
|
|
|
- DataTable data = inclusionProportion.Get_incaPIC_classify(dev_sczs_text.Text, TemplateClass, m_otsreport_export);
|
|
|
- if (data.Rows.Count == 0)
|
|
|
+ ViewType viewType;
|
|
|
+ DefaultBoolean VisDefaultBoolean;
|
|
|
+ string Pat;
|
|
|
+ string CPat;
|
|
|
+ if (m_mbszclass.M_KLFXJG.INCAGraphicSelection == 0)
|
|
|
{
|
|
|
- return;
|
|
|
+ viewType = ViewType.Pie;
|
|
|
+ Pat = "{A}";
|
|
|
+ CPat = "{A}";
|
|
|
+ VisDefaultBoolean = DefaultBoolean.True;
|
|
|
+ }
|
|
|
+ else if (m_mbszclass.M_KLFXJG.INCAGraphicSelection == 1)
|
|
|
+ {
|
|
|
+ viewType = ViewType.Bar;
|
|
|
+ Pat = "{V}";
|
|
|
+ CPat = "{V}";
|
|
|
+ VisDefaultBoolean = DefaultBoolean.False;
|
|
|
+ }
|
|
|
+ else /*if (m_mbszclass.M_KLFXJG.ParticleSizeGraphicSelection == 2)*/
|
|
|
+ {
|
|
|
+ viewType = ViewType.Line;
|
|
|
+ Pat = "{V}";
|
|
|
+ CPat = "{V}";
|
|
|
+ VisDefaultBoolean = DefaultBoolean.False;
|
|
|
}
|
|
|
|
|
|
- xrLabel_inca_pic_class.Visible = true;
|
|
|
- xrLabel_inca_pic_class.LocationF = new PointF(xrLabel_inca_pic_class.LocationF.X, NeueStartposition);
|
|
|
- NeueStartposition = xrLabel_inca_pic_class.LocationF.Y + xrLabel_inca_pic_class.SizeF.Height + 1;
|
|
|
-
|
|
|
- for (int i = 0; i < data.Rows.Count; i++)
|
|
|
+
|
|
|
+ if (m_mbszclass.M_KLFXJG.b_ck_klcc_dfl)
|
|
|
{
|
|
|
- if (data.Rows[i]["Class"].ToString() == "Other")
|
|
|
+ InclusionProportion inclusionProportion = new InclusionProportion();
|
|
|
+ DataTable data = inclusionProportion.Get_incaPIC_classify(dev_sczs_text.Text, TemplateClass, m_otsreport_export);
|
|
|
+ if (data.Rows.Count == 0)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ xrLabel_inca_pic_class.Visible = true;
|
|
|
+ xrLabel_inca_pic_class.LocationF = new PointF(xrLabel_inca_pic_class.LocationF.X, NeueStartposition);
|
|
|
+ NeueStartposition = xrLabel_inca_pic_class.LocationF.Y + xrLabel_inca_pic_class.SizeF.Height + 1;
|
|
|
+
|
|
|
+ for (int i = 0; i < data.Rows.Count; i++)
|
|
|
{
|
|
|
- data.Rows[i].Delete();
|
|
|
+ if (data.Rows[i]["Class"].ToString() == "Other")
|
|
|
+ {
|
|
|
+ data.Rows[i].Delete();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ data.AcceptChanges();
|
|
|
+ DataView dv = data.DefaultView;
|
|
|
+ dv.Sort = "Cunt DESC";
|
|
|
+ DataTable dt_data = dv.ToTable();
|
|
|
+ for (int i = 0; i < dt_data.Rows.Count; i++)
|
|
|
+ {
|
|
|
+ dt_data.Rows[i]["Class"] = subscript.Getsubscriptstring(dt_data.Rows[i]["Class"].ToString());
|
|
|
+ }
|
|
|
+
|
|
|
+ // 实例化饼图对象
|
|
|
+ Series pieSeriesClass = new Series("夹杂物面积比分类", viewType);
|
|
|
+
|
|
|
+ for (int i = 0; i < dt_data.Rows.Count; i++)
|
|
|
+ {
|
|
|
+ string name = dt_data.Rows[i]["Class"].ToString();
|
|
|
+ double Cunt = Convert.ToDouble(dt_data.Rows[i]["Cunt"]);
|
|
|
+ pieSeriesClass.Points.Add(new SeriesPoint(name, Cunt));
|
|
|
+ }
|
|
|
+ pieSeriesClass.LabelsVisibility = DefaultBoolean.True;
|
|
|
+ pieSeriesClass.Label.TextPattern = Pat;
|
|
|
+ if (m_mbszclass.M_KLFXJG.ParticleSizeGraphicSelection == 0)
|
|
|
+ {
|
|
|
+ pieSeriesClass.LabelsVisibility = DefaultBoolean.False;
|
|
|
}
|
|
|
+ xrChart_incaClass.Series.Add(pieSeriesClass);
|
|
|
+ xrChart_incaClass.Legend.Visibility = VisDefaultBoolean;
|
|
|
+
|
|
|
+
|
|
|
+ //// 实例化饼图对象
|
|
|
+ //Series pieSeriesClass = new Series("夹杂物面积比分类", ViewType.Pie);
|
|
|
+ //pieSeriesClass.ArgumentScaleType = ScaleType.Qualitative;
|
|
|
+ //// 项目名称
|
|
|
+ //pieSeriesClass.ArgumentDataMember = "Class";
|
|
|
+ //pieSeriesClass.ValueScaleType = ScaleType.Numerical;
|
|
|
+ ////取值字段
|
|
|
+ //pieSeriesClass.ValueDataMembers.AddRange(new string[] { "Cunt" });
|
|
|
+ //(pieSeriesClass.Label as PieSeriesLabel).Position = PieSeriesLabelPosition.Inside;
|
|
|
+ ////显示百分比
|
|
|
+ ////pieSeriesClass.PointOptions.PointView = PointView.ArgumentAndValues;
|
|
|
+ ////pieSeriesClass.PointOptions.ValueNumericOptions.Format = NumericFormat.Percent;
|
|
|
+ ////设置数据源
|
|
|
+ //pieSeriesClass.DataSource = dt_data;
|
|
|
+ //pieSeriesClass.LabelsVisibility = DevExpress.Utils.DefaultBoolean.False;
|
|
|
+
|
|
|
+ //pieSeriesClass.Label.TextPattern = "{A}";
|
|
|
+ //// 饼图空间添加 新建的饼图对象
|
|
|
+ //xrChart_incaClass.Series.Add(pieSeriesClass);
|
|
|
+ ////右上角分组视图
|
|
|
+ //this.xrChart_incaClass.Legend.MarkerSize = new System.Drawing.Size(20, 20);
|
|
|
+ //this.xrChart_incaClass.Legend.TextOffset = 5;
|
|
|
+ //this.xrChart_incaClass.Legend.VerticalIndent = 5;
|
|
|
+ //this.xrChart_incaClass.Legend.Border.Color = Color.Red;//红色边框
|
|
|
+ xrChart_incaClass.Visible = true;
|
|
|
+ xrChart_incaClass.LocationF = new PointF(30f, NeueStartposition);
|
|
|
+ NeueStartposition = xrChart_incaClass.LocationF.Y + xrChart_incaClass.SizeF.Height + 1;
|
|
|
}
|
|
|
- data.AcceptChanges();
|
|
|
- DataView dv = data.DefaultView;
|
|
|
- dv.Sort = "Cunt DESC";
|
|
|
- DataTable dt_data = dv.ToTable();
|
|
|
- for (int i = 0; i < dt_data.Rows.Count; i++)
|
|
|
- {
|
|
|
- dt_data.Rows[i]["Class"] = subscript.Getsubscriptstring(dt_data.Rows[i]["Class"].ToString());
|
|
|
- }
|
|
|
- // 实例化饼图对象
|
|
|
- Series pieSeriesClass = new Series("夹杂物面积比分类", ViewType.Pie);
|
|
|
- pieSeriesClass.ArgumentScaleType = ScaleType.Qualitative;
|
|
|
- // 项目名称
|
|
|
- pieSeriesClass.ArgumentDataMember = "Class";
|
|
|
- pieSeriesClass.ValueScaleType = ScaleType.Numerical;
|
|
|
- //取值字段
|
|
|
- pieSeriesClass.ValueDataMembers.AddRange(new string[] { "Cunt" });
|
|
|
- (pieSeriesClass.Label as PieSeriesLabel).Position = PieSeriesLabelPosition.Inside;
|
|
|
- //显示百分比
|
|
|
- //pieSeriesClass.PointOptions.PointView = PointView.ArgumentAndValues;
|
|
|
- //pieSeriesClass.PointOptions.ValueNumericOptions.Format = NumericFormat.Percent;
|
|
|
- //设置数据源
|
|
|
- pieSeriesClass.DataSource = dt_data;
|
|
|
- pieSeriesClass.LabelsVisibility = DevExpress.Utils.DefaultBoolean.False;
|
|
|
-
|
|
|
- pieSeriesClass.Label.TextPattern = "{A}";
|
|
|
- // 饼图空间添加 新建的饼图对象
|
|
|
- xrChart_incaClass.Series.Add(pieSeriesClass);
|
|
|
- //右上角分组视图
|
|
|
- this.xrChart_incaClass.Legend.MarkerSize = new System.Drawing.Size(20, 20);
|
|
|
- this.xrChart_incaClass.Legend.TextOffset = 5;
|
|
|
- this.xrChart_incaClass.Legend.VerticalIndent = 5;
|
|
|
- this.xrChart_incaClass.Legend.Border.Color = Color.Red;//红色边框
|
|
|
- xrChart_incaClass.Visible = true;
|
|
|
- xrChart_incaClass.LocationF = new PointF(30f, NeueStartposition);
|
|
|
- NeueStartposition = xrChart_incaClass.LocationF.Y + xrChart_incaClass.SizeF.Height + 1;
|
|
|
+
|
|
|
}
|
|
|
- public void set_incaPIC_subdivision()
|
|
|
+ public void set_incaPIC_subdivision(c_TemplateClass m_mbszclass)
|
|
|
{
|
|
|
- InclusionProportion inclusionProportion = new InclusionProportion();
|
|
|
- DataTable data = inclusionProportion.Get_incaPIC_subdivision(TemplateClass, m_otsreport_export);
|
|
|
- if(data.Rows.Count==0)
|
|
|
+ ViewType viewType;
|
|
|
+ DefaultBoolean VisDefaultBoolean;
|
|
|
+ string Pat;
|
|
|
+ string CPat;
|
|
|
+ if (m_mbszclass.M_KLFXJG.INCAGraphicSelection == 0)
|
|
|
{
|
|
|
- return;
|
|
|
+ viewType = ViewType.Pie;
|
|
|
+ Pat = "{A}";
|
|
|
+ CPat = "{A}";
|
|
|
+ VisDefaultBoolean = DefaultBoolean.True;
|
|
|
}
|
|
|
- xrChart_incaSubdivision.Visible = true;
|
|
|
- xrLabel_inca_pic_subdivision.Visible = true;
|
|
|
- xrLabel_inca_pic_subdivision.LocationF = new PointF(xrLabel_inca_pic_subdivision.LocationF.X, NeueStartposition);
|
|
|
- NeueStartposition = xrLabel_inca_pic_subdivision.LocationF.Y + xrLabel_inca_pic_subdivision.Height + 1;
|
|
|
-
|
|
|
+ else if (m_mbszclass.M_KLFXJG.INCAGraphicSelection == 1)
|
|
|
+ {
|
|
|
+ viewType = ViewType.Bar;
|
|
|
+ Pat = "{V}";
|
|
|
+ CPat = "{V}";
|
|
|
+ VisDefaultBoolean = DefaultBoolean.False;
|
|
|
+ }
|
|
|
+ else /*if (m_mbszclass.M_KLFXJG.ParticleSizeGraphicSelection == 2)*/
|
|
|
+ {
|
|
|
+ viewType = ViewType.Line;
|
|
|
+ Pat = "{V}";
|
|
|
+ CPat = "{V}";
|
|
|
+ VisDefaultBoolean = DefaultBoolean.False;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (m_mbszclass.M_KLFXJG.b_ck_klcc_xfl)
|
|
|
+ {
|
|
|
+ InclusionProportion inclusionProportion = new InclusionProportion();
|
|
|
+ DataTable data = inclusionProportion.Get_incaPIC_subdivision(TemplateClass, m_otsreport_export);
|
|
|
+ if (data.Rows.Count == 0)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ xrChart_incaSubdivision.Visible = true;
|
|
|
+ xrLabel_inca_pic_subdivision.Visible = true;
|
|
|
+ xrLabel_inca_pic_subdivision.LocationF = new PointF(xrLabel_inca_pic_subdivision.LocationF.X, NeueStartposition);
|
|
|
+ NeueStartposition = xrLabel_inca_pic_subdivision.LocationF.Y + xrLabel_inca_pic_subdivision.Height + 1;
|
|
|
|
|
|
|
|
|
|
|
|
- for (int i = 0; i < data.Rows.Count; i++)
|
|
|
- {
|
|
|
- if (data.Rows[i]["TypeName"].ToString() == "Not Identified")
|
|
|
+
|
|
|
+ for (int i = 0; i < data.Rows.Count; i++)
|
|
|
{
|
|
|
- data.Rows[i].Delete();
|
|
|
+ if (data.Rows[i]["TypeName"].ToString() == "Not Identified")
|
|
|
+ {
|
|
|
+ data.Rows[i].Delete();
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- data.AcceptChanges();
|
|
|
-
|
|
|
- DataView dv = data.DefaultView;
|
|
|
- dv.Sort = "con DESC";
|
|
|
- DataTable dt_data = dv.ToTable();
|
|
|
-
|
|
|
- for (int i = 0; i < dt_data.Rows.Count; i++)
|
|
|
- {
|
|
|
- dt_data.Rows[i]["TypeName"] = subscript.Getsubscriptstring(dt_data.Rows[i]["TypeName"].ToString());
|
|
|
- dt_data.Rows[i]["GroupName"] = subscript.Getsubscriptstring(dt_data.Rows[i]["GroupName"].ToString());
|
|
|
- }
|
|
|
- // 实例化饼图对象
|
|
|
- Series pieSeriesClass = new Series("夹杂物面积比细分类", ViewType.Pie);
|
|
|
- pieSeriesClass.ArgumentScaleType = ScaleType.Qualitative;
|
|
|
- // 项目名称
|
|
|
- pieSeriesClass.ArgumentDataMember = "TypeName";
|
|
|
- pieSeriesClass.ValueScaleType = ScaleType.Numerical;
|
|
|
- //取值字段
|
|
|
- pieSeriesClass.ValueDataMembers.AddRange(new string[] { "con" });
|
|
|
- (pieSeriesClass.Label as PieSeriesLabel).Position = PieSeriesLabelPosition.Inside;
|
|
|
- //显示百分比
|
|
|
- //pieSeriesClass.PointOptions.PointView = PointView.ArgumentAndValues;
|
|
|
- //pieSeriesClass.PointOptions.ValueNumericOptions.Format = NumericFormat.Percent;
|
|
|
- //设置数据源
|
|
|
- pieSeriesClass.DataSource = dt_data;
|
|
|
- pieSeriesClass.LabelsVisibility = DevExpress.Utils.DefaultBoolean.False;
|
|
|
-
|
|
|
- pieSeriesClass.Label.TextPattern = "{A}";
|
|
|
- // 饼图空间添加 新建的饼图对象
|
|
|
- xrChart_incaSubdivision.Series.Add(pieSeriesClass);
|
|
|
- //右上角分组视图
|
|
|
- this.xrChart_incaSubdivision.Legend.MarkerSize = new System.Drawing.Size(20, 20);
|
|
|
- this.xrChart_incaSubdivision.Legend.TextOffset = 5;
|
|
|
- this.xrChart_incaSubdivision.Legend.VerticalIndent = 5;
|
|
|
- this.xrChart_incaSubdivision.Legend.Border.Color = Color.Red;//红色边框
|
|
|
-
|
|
|
- xrChart_incaSubdivision.LocationF = new PointF(30f, NeueStartposition);
|
|
|
- NeueStartposition = xrChart_incaSubdivision.LocationF.Y + xrChart_incaSubdivision.Height + 1;
|
|
|
+ data.AcceptChanges();
|
|
|
+
|
|
|
+ DataView dv = data.DefaultView;
|
|
|
+ dv.Sort = "con DESC";
|
|
|
+ DataTable dt_data = dv.ToTable();
|
|
|
+
|
|
|
+ for (int i = 0; i < dt_data.Rows.Count; i++)
|
|
|
+ {
|
|
|
+ dt_data.Rows[i]["TypeName"] = subscript.Getsubscriptstring(dt_data.Rows[i]["TypeName"].ToString());
|
|
|
+ dt_data.Rows[i]["GroupName"] = subscript.Getsubscriptstring(dt_data.Rows[i]["GroupName"].ToString());
|
|
|
+ }
|
|
|
+
|
|
|
+ // 实例化饼图对象
|
|
|
+ Series pieSeriesClass = new Series("夹杂物面积比细分类", viewType);
|
|
|
+
|
|
|
+ for (int i = 0; i < dt_data.Rows.Count; i++)
|
|
|
+ {
|
|
|
+ string name = dt_data.Rows[i]["TypeName"].ToString();
|
|
|
+ double Cunt = Convert.ToDouble(dt_data.Rows[i]["con"]);
|
|
|
+ pieSeriesClass.Points.Add(new SeriesPoint(name, Cunt));
|
|
|
+ }
|
|
|
+ pieSeriesClass.LabelsVisibility = DefaultBoolean.True;
|
|
|
+ pieSeriesClass.Label.TextPattern = Pat;
|
|
|
+ if (m_mbszclass.M_KLFXJG.ParticleSizeGraphicSelection == 0)
|
|
|
+ {
|
|
|
+ pieSeriesClass.LabelsVisibility = DefaultBoolean.False;
|
|
|
+ }
|
|
|
+ xrChart_incaSubdivision.Series.Add(pieSeriesClass);
|
|
|
+ xrChart_incaSubdivision.Legend.Visibility = VisDefaultBoolean;
|
|
|
+ //// 实例化饼图对象
|
|
|
+ //Series pieSeriesClass = new Series("夹杂物面积比细分类", ViewType.Pie);
|
|
|
+ //pieSeriesClass.ArgumentScaleType = ScaleType.Qualitative;
|
|
|
+ //// 项目名称
|
|
|
+ //pieSeriesClass.ArgumentDataMember = "TypeName";
|
|
|
+ //pieSeriesClass.ValueScaleType = ScaleType.Numerical;
|
|
|
+ ////取值字段
|
|
|
+ //pieSeriesClass.ValueDataMembers.AddRange(new string[] { "con" });
|
|
|
+ //(pieSeriesClass.Label as PieSeriesLabel).Position = PieSeriesLabelPosition.Inside;
|
|
|
+ ////显示百分比
|
|
|
+ ////pieSeriesClass.PointOptions.PointView = PointView.ArgumentAndValues;
|
|
|
+ ////pieSeriesClass.PointOptions.ValueNumericOptions.Format = NumericFormat.Percent;
|
|
|
+ ////设置数据源
|
|
|
+ //pieSeriesClass.DataSource = dt_data;
|
|
|
+ //pieSeriesClass.LabelsVisibility = DevExpress.Utils.DefaultBoolean.False;
|
|
|
+
|
|
|
+ //pieSeriesClass.Label.TextPattern = "{A}";
|
|
|
+ //// 饼图空间添加 新建的饼图对象
|
|
|
+ //xrChart_incaSubdivision.Series.Add(pieSeriesClass);
|
|
|
+ ////右上角分组视图
|
|
|
+ //this.xrChart_incaSubdivision.Legend.MarkerSize = new System.Drawing.Size(20, 20);
|
|
|
+ //this.xrChart_incaSubdivision.Legend.TextOffset = 5;
|
|
|
+ //this.xrChart_incaSubdivision.Legend.VerticalIndent = 5;
|
|
|
+ //this.xrChart_incaSubdivision.Legend.Border.Color = Color.Red;//红色边框
|
|
|
+
|
|
|
+ xrChart_incaSubdivision.LocationF = new PointF(30f, NeueStartposition);
|
|
|
+ NeueStartposition = xrChart_incaSubdivision.LocationF.Y + xrChart_incaSubdivision.Height + 1;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
public static Color FromHex(string hex)
|