我正在努力(我是C#的初学者):1在列之间放置一些空格,定义Y轴的大小并在标签中显示辅助。我发布了我的代码,任何帮助都非常感谢。
Overall.SelectCommand = ToChart1;
Overall.Fill(ds, "TblChart1");
chart1.DataSource = ds.Tables["TblChart1"];
chart1.Series.Add("Series2");
chart1.Series.Add("Series3");
//chart1.Series["Series1"].XValueMember = "Ancillary";
chart1.Series["Series1"].YValueMembers = "Ancillary";
//chart1.Series["Series2"].XValueMember = "NonCommodity";
chart1.Series["Series2"].YValueMembers = "NonCommodity";
//chart1.Series["Series3"].XValueMember = "Totale";
chart1.Series["Series3"].YValueMembers = "Totale";
chart1.DataBind();
chart1.ChartAreas[0].AxisX.LabelStyle.Font = new Font("Calibri", 5);
chart1.ChartAreas[0].AxisX.Interval = 1;
//chart1.ChartAreas[0].AxisY.Maximum = 800000;
chart1.ChartAreas[0].AxisY.Minimum = 0;
chart1.Series[0].LegendText = "Ancillary";
chart1.Series[1].LegendText = "NonCommodity";
chart1.Series[2].LegendText = "Total";