ChartArea chartArea1 = new ChartArea("CA1");
chart1.ChartAreas.Add(chartArea1);
Series series1 = new Series("Series1");
chart1.Series.Add(series1);
chart1.Series["Series1"].Points.AddY(8);
chart1.Series["Series1"].Points.AddY(7);
chart1.Series["Series1"].Points.AddY(6);
chart1.Series["Series1"].Points.AddY(5);
chart1.Series["Series1"].Points.AddY(4);
chart1.Series["Series1"].ChartType = SeriesChartType.Column;
chart1.Series["Series1"]["LineTension"] = "0.6";
chart1.Series["Series1"].IsValueShownAsLabel = true;
chart1.Series["Series1"].MarkerStyle = MarkerStyle.Circle;
chart1.Series["Series1"].MarkerColor = Color.Magenta;
// Disable X axis margin
chart1.ChartAreas["CA1"].AxisX.IsMarginVisible = false;
chart1.ChartAreas["CA1"].AxisY.IsLogarithmic = !true;
chart1.ChartAreas["CA1"].AxisY.Maximum = 30;
chart1.ChartAreas["CA1"].AxisY.IsStartedFromZero = false;
chart1.Series["Series1"].Color = Color.FromArgb(120, 0, 155, 155);
/* 我有設最大值:
chart1.ChartAreas["CA1"].AxisY.Maximum = 30;
照理說我執行後應該最大應是30, 但出來卻是10,
不知道為什麼, 求教~
*/