MS Chart 數據條該如何調整...?

• 問題

• 想請教 MS Chart問題如下，今天練習做了一個直條圖如下示意圖...

請問我如果要調整 x (數據條的距離)，要用哪個屬性呢??

口：數據條

口←x→口←x→口

以下附上練習的程式碼：

string[] xValue = { "1", "2" };
string[] Title = { "pass", "fail" };
double[] yValue = { 36000, 36000 };
double[] yValue2 = { 12000, 12000 };

nChart = new Chart();
// 建立圖表區域
// 建立數據序列
// 建立圖例

nChart.Width = 800;
nChart.Height = 400;

nChart.ChartAreas["nChartAreas"].BackColor = Color.FromArgb(255, 255, 255);
nChart.ChartAreas["nChartAreas"].AxisY.MajorGrid.LineColor = Color.FromArgb(240, 240, 240);
nChart.ChartAreas["nChartAreas"].AxisX.MajorGrid.LineColor = Color.FromArgb(240, 240, 240);
nChart.ChartAreas["nChartAreas"].AxisY.LabelStyle.Format = "#'%'";

nChart.Legends["nLegends"].DockedToChartArea = "nChartAreas";
nChart.Legends["nLegends"].BackColor = Color.FromArgb(235, 235, 235);
nChart.Legends["nLegends"].BackHatchStyle = ChartHatchStyle.DarkDownwardDiagonal;
nChart.Legends["nLegends"].BorderWidth = 1;
nChart.Legends["nLegends"].BorderColor = Color.FromArgb(200, 200, 200);

nChart.Series["Series1"].ChartType = SeriesChartType.StackedColumn100;
nChart.Series["Series1"].Points.DataBindXY(xValue, yValue);
nChart.Series["Series1"].Legend = "nLegends";
nChart.Series["Series1"].LegendText = Title[0];
nChart.Series["Series1"].LabelFormat = yValue[0].ToString() + "(##'%')";
nChart.Series["Series1"].MarkerSize = 8;
nChart.Series["Series1"].LabelForeColor = Color.FromArgb(0, 90, 255);
nChart.Series["Series1"].Font = new System.Drawing.Font("Trebuchet MS", 10, System.Drawing.FontStyle.Bold);
nChart.Series["Series1"].LabelBackColor = Color.FromArgb(150, 255, 255, 255);
nChart.Series["Series1"].Color = Color.FromArgb(240, 65, 140, 240);
nChart.Series["Series1"].IsValueShownAsLabel = true;
nChart.Series["Series1"]["PixelPointWidth"] = "30";

nChart.Series["Series2"].ChartType = SeriesChartType.StackedColumn100;
nChart.Series["Series2"].Points.DataBindXY(xValue, yValue2);
nChart.Series["Series2"].Legend = "nLegends";
nChart.Series["Series2"].LegendText = Title[1];
nChart.Series["Series2"].LabelFormat = yValue2[0].ToString() + "(##'%')";
nChart.Series["Series2"].MarkerSize = 8;
nChart.Series["Series2"].LabelForeColor = Color.FromArgb(255, 103, 0);
nChart.Series["Series2"].Font = new System.Drawing.Font("Trebuchet MS", 10, System.Drawing.FontStyle.Bold);
nChart.Series["Series2"].LabelBackColor = Color.FromArgb(150, 255, 255, 255);
nChart.Series["Series2"].Color = Color.FromArgb(240, 252, 180, 65);
nChart.Series["Series2"].IsValueShownAsLabel = true;
nChart.Series["Series2"]["PixelPointWidth"] = "30";