我遇到了将数据源数据绑定到MS图表的问题。
Dim SQL As New clsSQLConnect
Dim cmd As New SqlCommand
cmd.Connection = SQL.SQLconn
cmd.CommandText = "SELECT * FROM Nachkalk"
Form1.Chart1.DataSource = cmd
Form1.Chart1.Series.Add("Price")
Form1.Chart1.Series("Price").ChartType = SeriesChartType.Line
Form1.Chart1.Series("Price").XValueMember = "Price"
Form1.Chart1.Series("Price").YValueMembers = "Customer"
Form1.Chart1.DataBind()
SQL.closeSQL()
它甚至没有在我的图表中显示任何内容。
提前致谢