瀏覽代碼

优化显示

zhangjiaxin 3 月之前
父節點
當前提交
dfbf27dbf6

+ 18 - 4
OTSIncAReportApp/1-UI/Control_Grids/CompositionDistributionGrid.cs

@@ -313,6 +313,19 @@ namespace OTSIncAReportGrids
             DevFunctions.ChangeView2(chartControl1, comboBox1Text);
             chartControl1.Location = new Point(pos, list_gridheight.Max());
             chartControl1.Size = new Size(GridPosition, GridPosition);
+			// 获取图表的坐标系(通常为 XYDiagram)
+            XYDiagram diagram = chartControl1.Diagram as XYDiagram;
+
+			if (diagram != null)
+			{
+				// 设置横坐标(X轴)名称
+				diagram.AxisX.Title.Text = "种类";
+				diagram.AxisX.Title.Visibility = DevExpress.Utils.DefaultBoolean.True; // 确保标题可见
+
+				// 设置纵坐标(Y轴)名称
+				diagram.AxisY.Title.Text = "数量";
+				diagram.AxisY.Title.Visibility = DevExpress.Utils.DefaultBoolean.True; // 确保标题可见
+			}
 			panel1.Controls.Add(chartControl1);
 		}
 
@@ -378,12 +391,13 @@ namespace OTSIncAReportGrids
             gridView.RowHeadersWidth = 40;
             gridView.RowTemplate.Height = 30;
             //gridView.Size = new System.Drawing.Size(667, 520);
-            gridView.Size = new System.Drawing.Size(gridView.ColumnCount * 100 + 60, gridView.RowCount * 30 + 30);
-            //gridheight = gridheight + gridView.RowCount * 30 + 80;
-			gridheight = gridheight + gridView.RowCount * 30 + 40;
+            gridView.Size = new System.Drawing.Size(gridView.ColumnCount * 100 + 60, gridView.RowCount * 30);
+			//gridView.Size = new System.Drawing.Size(gridView.ColumnCount * 100 + 60, gridView.RowCount * 30 + 30);
+			//gridheight = gridheight + gridView.RowCount * 30 + 80;
+			gridheight = gridheight + gridView.RowCount * 30 + 5;
 			gridwidth = gridwidth + gridView.ColumnCount * 100 + 60;
             chartposition = chartposition + gridView.ColumnCount * 100;
-			GridPosition = gridView.ColumnCount * 100 ;
+			GridPosition = gridView.ColumnCount * 100 +40;
 			list_gridheight.Add(gridheight);
 
 			gridView.TabIndex = 0;

+ 1 - 1
OTSIncAReportApp/1-UI/OTSDisplaySourceGridData/frmReportConditionChoose.cs

@@ -235,7 +235,7 @@ namespace OTSIncAReportApp
             List<string> list_PARTICE_LIST = new List<string>() { analyticalParticle, otherParticles, MergeParticles, allParticles };
             AddGridData(OTS_REPORT_PROP_GRID_ITEMS.PARTICE_LIST, dataSourceType, OTS_ITEM_TYPES.COMBO, false, "data source type", list_PARTICE_LIST[0], list_PARTICE_LIST, 0);
 			//chart图形类型
-			List<string> cahrtType = new List<string>() { "折线图", "柱状图", "饼图", "圆环图", "气泡图", "簇状条形图" , "堆积条形图", "瀑布图",
+			List<string> cahrtType = new List<string>() { "柱状图", "折线图", "饼图", "圆环图", "气泡图", "簇状条形图" , "堆积条形图", "瀑布图",
 "3D柱状图","3D圆环图","3D饼图","3D折线图","3D百分比堆积条形图","3D漏斗图","3DManhattan 条形图","3D堆积条形图","3D阶梯线图"};
 			AddGridData(OTS_REPORT_PROP_GRID_ITEMS.GRAPHIC_TYPE, "图形类型", OTS_ITEM_TYPES.COMBO, false, "graphic type", cahrtType[0], cahrtType, 0);
 		}