VB外掛ZedGraphControl
Dim countchartx As Integer '定義在最前面
DataGridView1.DataSource = set1.Tables("1a"' 要先把資料庫資料放入資料表!!!


'在程式中

Dim month(DataGridView1.Rows.Count - 1) As String  '定義一個資料表筆數的矩陣
For Me.countchartx = 1 To DataGridView1.Rows.Count - 1
	month(Me.countchartx - 1) = Format(CDate(DataGridView1.Rows(Me.countchartx - 1).Cells(1).Value), "hh:mm:ss"'把所有資料表的時間存入矩陣中
Next

ZedGraphControl1.GraphPane.XAxis.Type = AxisType.Text
ZedGraphControl1.GraphPane.XAxis.Scale.TextLabels = month  '然後就會放在X軸囉
arrow
arrow
    文章標籤
    ZedGraphControl VB
    全站熱搜

    JL8051 發表在 痞客邦 留言(0) 人氣()