เป็นการทำกราฟด้วยคอนโทรล MSChart ของ Visual Basic ครับ
[hide=10]แสดงผลข้อมูลที่รับจาก HSCroll Bar แสดงผลในรูปแบบ กราฟเส้นครับ
[code]Private Sub Form_Load()
Timer1.Interval = 1000
Label1.Caption = "Data :"
MSChart1.ColumnCount = 1
MSChart1.RowCount = 10
MSChart1.chartType = VtChChartType2dLine
MSChart1.Plot.Axis(VtChAxisIdY).ValueScale.Auto = False
MSChart1.Plot.Axis(VtChAxisIdY).ValueScale.Minimum = -10
MSChart1.Plot.Axis(VtChAxisIdY).ValueScale.Maximum = 10
MSChart1.Plot.Axis(VtChAxisIdY).ValueScale.MajorDivision = 10
End Sub
Private Sub Timer1_Timer()
Data = HScroll1.Value
Label2.Caption = Data
For i = 1 To MSChart1.RowCount - 1


Reply With Quote
