我想在visual studio中创建一个折线图,如下图Excel中的图片所示:
在我访问Visual Studio之前,我尝试在Microsoft访问中创建一个表,如下图所示,但我仍然不确定在visual basic中创建图表的步骤:
然后,在visual studio中,我继续添加了一个报表查看器和DataGridView。在下面的图片中,您可以看到我的Form1界面:
以下是我的报告图表中的设置:
然而结果产生了这个:
以下是代码:
Public Class Form1
Private Sub Table1BindingNavigatorSaveItem_Click(sender As Object, e As EventArgs) Handles Table1BindingNavigatorSaveItem.Click
Me.Validate()
Me.Table1BindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me._5DataSet)
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the '_5DataSet.Table1' table. You can move, or remove it, as needed.
Me.Table1TableAdapter.Fill(Me._5DataSet.Table1)
Me.ReportViewer1.RefreshReport()
End Sub
Private Sub Chart1_Click(sender As Object, e As EventArgs)
End Sub
Private Sub ReportViewer1_Load(sender As Object, e As EventArgs) Handles ReportViewer1.Load
End Sub
End Class
我的问题是,如何更改此设置,以便x轴显示值1到24,图表中的所有值与我在Excel中的绘图相同?
答案 0 :(得分:1)
对于报告图表中的设置,我建议将OLD和LimitPower移动到"值"图表数据中的部分和移动到系列组的时间。