|
|
@@ -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;
|