Public Class latihan_44_36109058 Dim yunha As New OleDb.OleDbConnection("Provider=microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb") Dim dt As New DataTable Private Sub latihan_44_36109058_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim yh As New OleDb.OleDbDataAdapter yh = New OleDb.OleDbDataAdapter("Select * From QPembelianPerBulanan", yunha) yh.Fill(dt) yh.Dispose() dgv4.DataSource = dt
AxMSChart4.Column = 3 AxMSChart4.Data = dn("JUMLAH") / 1000 Next End Sub
Private Sub gb_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gb.Click 'Mengubah tipe grafik' AxMSChart4.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar End Sub
Private Sub gl_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gl.Click 'Mengubah tipe grafik' AxMSChart4.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine End Sub
Private Sub glkn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles glkn.Click 'Mengubah tipe grafik' AxMSChart4.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie End Sub
Private Sub gbd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gbd.Click 'Mengubah tipe grafik' AxMSChart4.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar End Sub
Private Sub gl3d_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gl3d.Click 'Mengubah tipe grafik' AxMSChart4.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine End Sub End Class
Public Class LATIHAN_044_36109075 Dim pute As New DataTable Dim AB As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb")
Private Sub LATIHAN_044_36109075_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim mobil As New OleDb.OleDbDataAdapter mobil = New OleDb.OleDbDataAdapter("select* from QpembelianPerBulanan", AB) mobil.Fill(pute) putrya075.DataSource = pute mobil.Dispose()
'membuat jumlah baris dan jumlah kolom grafik yang akan dibuat putryalfatih.RowCount = pute.Rows.Count() putryalfatih.ColumnCount = 3
'memasukkan data ke setiap baris dan setiap kolom dari Data Tabel QpembelianPerBulanan Dim LORENZO As Integer = 0
For Each BarisX As DataRow In pute.Rows LORENZO = LORENZO + 1
putryalfatih.Row = LORENZO putryalfatih.RowLabel = BarisX("BULAN")
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click putryalfatih.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click putryalfatih.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click putryalfatih.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click putryalfatih.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click putryalfatih.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine End Sub End Class
Public Class Latihan_44_059 Dim k As New OleDb.OleDbConnection("Provider=microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb") Dim dt As New DataTable
Private Sub Latihan_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim X As New OleDb.OleDbDataAdapter X = New OleDb.OleDbDataAdapter("Select * From QPembelianPerBulanan", k) X.Fill(dt) X.Dispose() cika059.DataSource = dt
chart059.Column = 3 chart059.Data = cika("JUMLAH") / 1000 Next End Sub
Private Sub gb_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gb.Click 'Mengubah tipe grafik' chart059.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar End Sub
Private Sub gl_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gl.Click 'Mengubah tipe grafik' chart059.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine End Sub
Private Sub graling_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles graling.Click 'Mengubah tipe grafik' chart059.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie End Sub
Private Sub gb3d_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gb3d.Click 'Mengubah tipe grafik' chart059.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar End Sub
Private Sub gl3d_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gl3d.Click 'Mengubah tipe grafik' chart059.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine End Sub End Class
Public Class Form44068 Dim A As New OleDb.OleDbConnection("Provider=microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb") Dim dt As New DataTable Private Sub Form44068_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim X As New OleDb.OleDbDataAdapter X = New OleDb.OleDbDataAdapter("Select * From QPembelianPerBulanan", A) X.Fill(dt) X.Dispose() dgv068.DataSource = dt
Chart068.Column = 3 Chart068.Data = ina("JUMLAH") / 1000 Next End Sub
Private Sub gb_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gb.Click 'Mengubah tipe grafik' Chart068.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar End Sub
Private Sub gl_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gl.Click 'Mengubah tipe grafik' Chart068.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine End Sub
Private Sub glk_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles glk.Click 'Mengubah tipe grafik' Chart068.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie End Sub
Private Sub gb3d_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gb3d.Click 'Mengubah tipe grafik' Chart068.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar End Sub
Private Sub gl3d_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gl3d.Click 'Mengubah tipe grafik' Chart068.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine End Sub End Class
Public Class LATIHAN044_060 Dim M As New OleDb.OleDbConnection("Provider=microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb") Dim dt As New DataTable
Private Sub Latihan44017_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim Y As New OleDb.OleDbDataAdapter Y = New OleDb.OleDbDataAdapter("Select * From QPembelianPerBulanan", M) Y.Fill(dt) Y.Dispose() DGV4_060.DataSource = dt
grafik060.Column = 3 grafik060.Data = ina("JUMLAH") / 1000 Next End Sub
Private Sub dgb_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dgb060.Click 'Mengubah tipe grafik' grafik060.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar End Sub
Private Sub gl060_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gl060.Click 'Mengubah tipe grafik' grafik060.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine End Sub
Private Sub glr060_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles glr060.Click 'Mengubah tipe grafik' grafik060.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie End Sub
Private Sub gb060_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gb060.Click 'Mengubah tipe grafik' grafik060.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar End Sub
Private Sub gbl060_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gbl060.Click 'Mengubah tipe grafik' grafik060.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine End Sub End Class
Public Class latihan_44_36109074 Dim krisna As New OleDb.OleDbConnection("Provider=microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb") Dim ks As New DataTable
Private Sub latihan_44_36109074_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim k As New OleDb.OleDbDataAdapter k = New OleDb.OleDbDataAdapter("Select * From QPembelianPerBulanan", krisna) k.Fill(ks) k.Dispose() dgv_074.DataSource = ks
chart_074.Column = 3 chart_074.Data = ano("JUMLAH") / 1000 Next End Sub
Private Sub gb_074_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gb_074.Click 'Mengubah tipe grafik' chart_074.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
End Sub
Private Sub gl_074_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gl_074.Click 'Mengubah tipe grafik' chart_074.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
End Sub
Private Sub gl2_074_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gl2_074.Click 'Mengubah tipe grafik' chart_074.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
End Sub
Private Sub gb3d_074_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gb3d_074.Click 'Mengubah tipe grafik' chart_074.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
End Sub
Private Sub gl3d_074_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gl3d_074.Click 'Mengubah tipe grafik' chart_074.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
Dim AA As New OleDb.OleDbConnection("Provider=microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb") Dim dt As New DataTable
Private Sub Latihan44_36109073_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim Y As New OleDb.OleDbDataAdapter Y = New OleDb.OleDbDataAdapter("Select * From QPembelianPerBulanan", AA) Y.Fill(dt) Y.Dispose() DGV4073.DataSource = dt
Chart4073.Column = 3 Chart4073.Data = EVI("JUMLAH") / 1000 Next
End Sub
Private Sub GB073_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GB073.Click 'Mengubah tipe grafik' Chart4073.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar End Sub
Private Sub GL073_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GL073.Click 'Mengubah tipe grafik' Chart4073.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine End Sub
Private Sub GLI073_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GLI073.Click 'Mengubah tipe grafik' Chart4073.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie End Sub
Private Sub GBD073_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GBD073.Click 'Mengubah tipe grafik' Chart4073.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar End Sub
Private Sub GLD073_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GLD073.Click 'Mengubah tipe grafik' Chart4073.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine End Sub End Class
Public Class Form4436109084 Dim dfa As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/DATA GRAFIK.ACCDB") Dim dt As New DataTable Private Sub Form4436109084_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim a As New OleDb.OleDbDataAdapter a = New OleDb.OleDbDataAdapter("select * from qpembelianperbulanan", dfa) dt.Rows.Clear() a.Fill(dt) a.Dispose()
chart_084.Column = 3 chart_084.Data = x("jumlah") / 10000 Next End Sub
Private Sub gb_084_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gb_084.Click chart_084.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar End Sub
Private Sub gl_084_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gl_084.Click chart_084.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine End Sub
Private Sub gl2_084_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gl2_084.Click chart_084.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie End Sub
Private Sub gb3_084_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gb3_084.Click chart_084.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar End Sub
Private Sub gl3_084_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gl3_084.Click chart_084.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine End Sub
Public Class Latihan_44_09079 Dim cate As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/DATA GRAFIK.ACCDB") Dim dt As New DataTable
Private Sub Latihan_44_09079_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim a As New OleDb.OleDbDataAdapter a = New OleDb.OleDbDataAdapter("select * from qpembelianperbulanan", cate) dt.Rows.Clear() a.Fill(dt) a.Dispose()
catherine.Column = 3 catherine.Data = x("jumlah") / 10000 Next End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click catherine.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click catherine.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click catherine.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click catherine.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click catherine.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine End Sub End Class
Public Class latihan4436109061 Dim mjl As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/DATA GRAFIK.ACCDB") Dim dt As New DataTable
Private Sub latihan4436109061_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim L As New OleDb.OleDbDataAdapter L = New OleDb.OleDbDataAdapter("select * from qpembelianperbulanan", mjl) dt.Rows.Clear() L.Fill(dt) L.Dispose()
lilis.Column = 3 lilis.Data = x("jumlah") / 10000 Next End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click lilis.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click lilis.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click lilis.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click lilis.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click lilis.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine End Sub End Class
Public Class Form4436109062 Dim KJS As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Data Grafik.ACCDB") Dim dt As New DataTable
Private Sub Form4436109062_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim b As New OleDb.OleDbDataAdapter b = New OleDb.OleDbDataAdapter("select * from qpembelianperbulanan", KJS) dt.Rows.Clear() b.Fill(dt) b.Dispose()
urim.Column = 3 urim.Data = x("jumlah") / 10000 Next End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click urim.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click urim.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click urim.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click urim.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click urim.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine End Sub End Class
Public Class latihan44 Dim nurul As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/DATA GRAFIK.ACCDB") Dim dt As New DataTable
Private Sub latihan44_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim a As New OleDb.OleDbDataAdapter a = New OleDb.OleDbDataAdapter("select * from qpembelianperbulanan", nurul) dt.Rows.Clear() a.Fill(dt) a.Dispose()
ilmi.Column = 3 ilmi.Data = x("jumlah") / 10000 Next End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ilmi.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click ilmi.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click ilmi.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click ilmi.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click ilmi.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine End Sub End Class
Dim v As New OleDb.OleDbConnection("Provider=microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb") Dim dt As New DataTable
Private Sub Tugas44_36109067_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim X As New OleDb.OleDbDataAdapter X = New OleDb.OleDbDataAdapter("Select * From QPembelianPerBulanan", v) X.Fill(dt) X.Dispose() dgv067.DataSource = dt
chart067.Column = 3 chart067.Data = ina("JUMLAH") / 1000 Next End Sub
Private Sub GB_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GB.Click 'Mengubah tipe grafik' chart067.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar End Sub
Private Sub GL_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GL.Click 'Mengubah tipe grafik' chart067.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine End Sub
Private Sub GLng_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GLng.Click 'Mengubah tipe grafik' chart067.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie End Sub
Private Sub GB2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GB2.Click 'Mengubah tipe grafik' chart067.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar End Sub
Private Sub GL3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GL3.Click 'Mengubah tipe grafik' chart067.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
Public Class latihan_44_36109058
BalasHapusDim yunha As New OleDb.OleDbConnection("Provider=microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb")
Dim dt As New DataTable
Private Sub latihan_44_36109058_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim yh As New OleDb.OleDbDataAdapter
yh = New OleDb.OleDbDataAdapter("Select * From QPembelianPerBulanan", yunha)
yh.Fill(dt)
yh.Dispose()
dgv4.DataSource = dt
'Membuat grafik'
AxMSChart4.ColumnCount = 3
AxMSChart4.RowCount = dt.Rows.Count
'Membuat tabel dalam grafik'
Dim yi As Integer = 0
For Each dn As DataRow In dt.Rows
yi = yi + 1
AxMSChart4.Row = yi
AxMSChart4.RowLabel = dn("BULAN")
AxMSChart4.Column = 1
AxMSChart4.Data = dn("UNIT")
AxMSChart4.Column = 2
AxMSChart4.Data = dn("RATA-RATA HARGA") / 1000
AxMSChart4.Column = 3
AxMSChart4.Data = dn("JUMLAH") / 1000
Next
End Sub
Private Sub gb_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gb.Click
'Mengubah tipe grafik'
AxMSChart4.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
End Sub
Private Sub gl_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gl.Click
'Mengubah tipe grafik'
AxMSChart4.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
End Sub
Private Sub glkn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles glkn.Click
'Mengubah tipe grafik'
AxMSChart4.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
End Sub
Private Sub gbd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gbd.Click
'Mengubah tipe grafik'
AxMSChart4.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
End Sub
Private Sub gl3d_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gl3d.Click
'Mengubah tipe grafik'
AxMSChart4.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
End Sub
End Class
Public Class LATIHAN_044_36109075
BalasHapusDim pute As New DataTable
Dim AB As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb")
Private Sub LATIHAN_044_36109075_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim mobil As New OleDb.OleDbDataAdapter
mobil = New OleDb.OleDbDataAdapter("select* from QpembelianPerBulanan", AB)
mobil.Fill(pute)
putrya075.DataSource = pute
mobil.Dispose()
'membuat jumlah baris dan jumlah kolom grafik yang akan dibuat
putryalfatih.RowCount = pute.Rows.Count()
putryalfatih.ColumnCount = 3
'memasukkan data ke setiap baris dan setiap kolom dari Data Tabel QpembelianPerBulanan
Dim LORENZO As Integer = 0
For Each BarisX As DataRow In pute.Rows
LORENZO = LORENZO + 1
putryalfatih.Row = LORENZO
putryalfatih.RowLabel = BarisX("BULAN")
putryalfatih.Column = 1
putryalfatih.Data = BarisX("UNIT")
putryalfatih.Column = 2
putryalfatih.Data = BarisX("RATA-RATA HARGA") / 1000
putryalfatih.Column = 3
putryalfatih.Data = BarisX("JUMLAH") / 1000
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
putryalfatih.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
putryalfatih.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
putryalfatih.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
putryalfatih.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
putryalfatih.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
End Sub
End Class
Public Class Latihan_44_059
BalasHapusDim k As New OleDb.OleDbConnection("Provider=microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb")
Dim dt As New DataTable
Private Sub Latihan_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim X As New OleDb.OleDbDataAdapter
X = New OleDb.OleDbDataAdapter("Select * From QPembelianPerBulanan", k)
X.Fill(dt)
X.Dispose()
cika059.DataSource = dt
'Membuat grafik'
chart059.ColumnCount = 3
chart059.RowCount = dt.Rows.Count
'Membuat tabel dalam grafik'
Dim PB As Integer = 0
For Each cika As DataRow In dt.Rows
PB = PB + 1
chart059.Row = PB
chart059.RowLabel = cika("BULAN")
chart059.Column = 1
chart059.Data = cika("UNIT")
chart059.Column = 2
chart059.Data = cika("RATA-RATA HARGA") / 1000
chart059.Column = 3
chart059.Data = cika("JUMLAH") / 1000
Next
End Sub
Private Sub gb_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gb.Click
'Mengubah tipe grafik'
chart059.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
End Sub
Private Sub gl_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gl.Click
'Mengubah tipe grafik'
chart059.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
End Sub
Private Sub graling_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles graling.Click
'Mengubah tipe grafik'
chart059.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
End Sub
Private Sub gb3d_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gb3d.Click
'Mengubah tipe grafik'
chart059.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
End Sub
Private Sub gl3d_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gl3d.Click
'Mengubah tipe grafik'
chart059.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
End Sub
End Class
Public Class Form44068
BalasHapusDim A As New OleDb.OleDbConnection("Provider=microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb")
Dim dt As New DataTable
Private Sub Form44068_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim X As New OleDb.OleDbDataAdapter
X = New OleDb.OleDbDataAdapter("Select * From QPembelianPerBulanan", A)
X.Fill(dt)
X.Dispose()
dgv068.DataSource = dt
'Membuat grafik'
Chart068.ColumnCount = 3
Chart068.RowCount = dt.Rows.Count
'Membuat tabel dalam grafik'
Dim PB As Integer = 0
For Each ina As DataRow In dt.Rows
PB = PB + 1
Chart068.Row = PB
Chart068.RowLabel = ina("BULAN")
Chart068.Column = 1
Chart068.Data = ina("UNIT")
Chart068.Column = 2
Chart068.Data = ina("RATA-RATA HARGA") / 1000
Chart068.Column = 3
Chart068.Data = ina("JUMLAH") / 1000
Next
End Sub
Private Sub gb_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gb.Click
'Mengubah tipe grafik'
Chart068.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
End Sub
Private Sub gl_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gl.Click
'Mengubah tipe grafik'
Chart068.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
End Sub
Private Sub glk_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles glk.Click
'Mengubah tipe grafik'
Chart068.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
End Sub
Private Sub gb3d_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gb3d.Click
'Mengubah tipe grafik'
Chart068.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
End Sub
Private Sub gl3d_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gl3d.Click
'Mengubah tipe grafik'
Chart068.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
End Sub
End Class
Public Class LATIHAN044_060
BalasHapusDim M As New OleDb.OleDbConnection("Provider=microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb")
Dim dt As New DataTable
Private Sub Latihan44017_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Y As New OleDb.OleDbDataAdapter
Y = New OleDb.OleDbDataAdapter("Select * From QPembelianPerBulanan", M)
Y.Fill(dt)
Y.Dispose()
DGV4_060.DataSource = dt
'Membuat grafik'
grafik060.ColumnCount = 3
grafik060.RowCount = dt.Rows.Count
'Membuat tabel dalam grafik'
Dim PB As Integer = 0
For Each ina As DataRow In dt.Rows
PB = PB + 1
grafik060.Row = PB
grafik060.RowLabel = ina("BULAN")
grafik060.Column = 1
grafik060.Data = ina("UNIT")
grafik060.Column = 2
grafik060.Data = ina("RATA-RATA HARGA") / 1000
grafik060.Column = 3
grafik060.Data = ina("JUMLAH") / 1000
Next
End Sub
Private Sub dgb_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dgb060.Click
'Mengubah tipe grafik'
grafik060.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
End Sub
Private Sub gl060_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gl060.Click
'Mengubah tipe grafik'
grafik060.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
End Sub
Private Sub glr060_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles glr060.Click
'Mengubah tipe grafik'
grafik060.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
End Sub
Private Sub gb060_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gb060.Click
'Mengubah tipe grafik'
grafik060.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
End Sub
Private Sub gbl060_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gbl060.Click
'Mengubah tipe grafik'
grafik060.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
End Sub
End Class
Public Class latihan_44_36109074
BalasHapusDim krisna As New OleDb.OleDbConnection("Provider=microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb")
Dim ks As New DataTable
Private Sub latihan_44_36109074_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim k As New OleDb.OleDbDataAdapter
k = New OleDb.OleDbDataAdapter("Select * From QPembelianPerBulanan", krisna)
k.Fill(ks)
k.Dispose()
dgv_074.DataSource = ks
'Membuat grafik'
chart_074.ColumnCount = 3
chart_074.RowCount = ks.Rows.Count
'Membuat tabel dalam grafik'
Dim tati As Integer = 0
For Each ano As DataRow In ks.Rows
tati = tati + 1
chart_074.Row = tati
chart_074.RowLabel = ano("BULAN")
chart_074.Column = 1
chart_074.Data = ano("UNIT")
chart_074.Column = 2
chart_074.Data = ano("RATA-RATA HARGA") / 1000
chart_074.Column = 3
chart_074.Data = ano("JUMLAH") / 1000
Next
End Sub
Private Sub gb_074_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gb_074.Click
'Mengubah tipe grafik'
chart_074.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
End Sub
Private Sub gl_074_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gl_074.Click
'Mengubah tipe grafik'
chart_074.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
End Sub
Private Sub gl2_074_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gl2_074.Click
'Mengubah tipe grafik'
chart_074.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
End Sub
Private Sub gb3d_074_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gb3d_074.Click
'Mengubah tipe grafik'
chart_074.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
End Sub
Private Sub gl3d_074_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gl3d_074.Click
'Mengubah tipe grafik'
chart_074.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
End Sub
End Class
Public Class Latihan44_36109073
BalasHapusDim AA As New OleDb.OleDbConnection("Provider=microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb")
Dim dt As New DataTable
Private Sub Latihan44_36109073_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Y As New OleDb.OleDbDataAdapter
Y = New OleDb.OleDbDataAdapter("Select * From QPembelianPerBulanan", AA)
Y.Fill(dt)
Y.Dispose()
DGV4073.DataSource = dt
'Membuat grafik'
Chart4073.ColumnCount = 3
Chart4073.RowCount = dt.Rows.Count
'Membuat tabel dalam grafik'
Dim EK As Integer = 0
For Each EVI As DataRow In dt.Rows
EK = EK + 1
Chart4073.Row = EK
Chart4073.RowLabel = EVI("BULAN")
Chart4073.Column = 1
Chart4073.Data = EVI("UNIT")
Chart4073.Column = 2
Chart4073.Data = EVI("RATA-RATA HARGA") / 1000
Chart4073.Column = 3
Chart4073.Data = EVI("JUMLAH") / 1000
Next
End Sub
Private Sub GB073_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GB073.Click
'Mengubah tipe grafik'
Chart4073.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
End Sub
Private Sub GL073_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GL073.Click
'Mengubah tipe grafik'
Chart4073.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
End Sub
Private Sub GLI073_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GLI073.Click
'Mengubah tipe grafik'
Chart4073.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
End Sub
Private Sub GBD073_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GBD073.Click
'Mengubah tipe grafik'
Chart4073.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
End Sub
Private Sub GLD073_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GLD073.Click
'Mengubah tipe grafik'
Chart4073.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
End Sub
End Class
Public Class Form4436109084
BalasHapusDim dfa As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/DATA GRAFIK.ACCDB")
Dim dt As New DataTable
Private Sub Form4436109084_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim a As New OleDb.OleDbDataAdapter
a = New OleDb.OleDbDataAdapter("select * from qpembelianperbulanan", dfa)
dt.Rows.Clear()
a.Fill(dt)
a.Dispose()
dgv_084.DataSource = dt
chart_084.ColumnCount = 3
chart_084.RowCount = dt.Rows.Count
Dim fitrah As Integer = 0
For Each x As DataRow In dt.Rows
fitrah += 1
chart_084.Row = fitrah
chart_084.RowLabel = x("bulan")
chart_084.Column = 1
chart_084.Data = x("unit")
chart_084.Column = 2
chart_084.Data = x("rata-rata harga") / 1000
chart_084.Column = 3
chart_084.Data = x("jumlah") / 10000
Next
End Sub
Private Sub gb_084_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gb_084.Click
chart_084.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
End Sub
Private Sub gl_084_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gl_084.Click
chart_084.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
End Sub
Private Sub gl2_084_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gl2_084.Click
chart_084.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
End Sub
Private Sub gb3_084_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gb3_084.Click
chart_084.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
End Sub
Private Sub gl3_084_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gl3_084.Click
chart_084.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
End Sub
End Class
Public Class Latihan_44_09079
BalasHapusDim cate As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/DATA GRAFIK.ACCDB")
Dim dt As New DataTable
Private Sub Latihan_44_09079_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim a As New OleDb.OleDbDataAdapter
a = New OleDb.OleDbDataAdapter("select * from qpembelianperbulanan", cate)
dt.Rows.Clear()
a.Fill(dt)
a.Dispose()
dgv079.DataSource = dt
catherine.ColumnCount = 3
catherine.RowCount = dt.Rows.Count
Dim pkkp As Integer = 0
For Each x As DataRow In dt.Rows
pkkp += 1
catherine.Row = pkkp
catherine.RowLabel = x("bulan")
catherine.Column = 1
catherine.Data = x("unit")
catherine.Column = 2
catherine.Data = x("rata-rata harga") / 1000
catherine.Column = 3
catherine.Data = x("jumlah") / 10000
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
catherine.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
catherine.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
catherine.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
catherine.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
catherine.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
End Sub
End Class
Public Class latihan4436109061
BalasHapusDim mjl As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/DATA GRAFIK.ACCDB")
Dim dt As New DataTable
Private Sub latihan4436109061_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim L As New OleDb.OleDbDataAdapter
L = New OleDb.OleDbDataAdapter("select * from qpembelianperbulanan", mjl)
dt.Rows.Clear()
L.Fill(dt)
L.Dispose()
dgvku.DataSource = dt
lilis.ColumnCount = 3
lilis.RowCount = dt.Rows.Count
Dim lili As Integer = 0
For Each x As DataRow In dt.Rows
lili += 1
lilis.Row = lili
lilis.RowLabel = x("bulan")
lilis.Column = 1
lilis.Data = x("unit")
lilis.Column = 2
lilis.Data = x("rata-rata harga") / 1000
lilis.Column = 3
lilis.Data = x("jumlah") / 10000
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
lilis.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
lilis.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
lilis.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
lilis.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
lilis.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
End Sub
End Class
Public Class Form4436109062
BalasHapusDim KJS As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Data Grafik.ACCDB")
Dim dt As New DataTable
Private Sub Form4436109062_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim b As New OleDb.OleDbDataAdapter
b = New OleDb.OleDbDataAdapter("select * from qpembelianperbulanan", KJS)
dt.Rows.Clear()
b.Fill(dt)
b.Dispose()
dgv062.DataSource = dt
urim.ColumnCount = 3
urim.RowCount = dt.Rows.Count
Dim fani As Integer = 0
For Each x As DataRow In dt.Rows
fani += 1
urim.Row = fani
urim.RowLabel = x("bulan")
urim.Column = 1
urim.Data = x("unit")
urim.Column = 2
urim.Data = x("rata-rata harga") / 1000
urim.Column = 3
urim.Data = x("jumlah") / 10000
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
urim.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
urim.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
urim.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
urim.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
urim.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
End Sub
End Class
Public Class latihan44
BalasHapusDim nurul As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/DATA GRAFIK.ACCDB")
Dim dt As New DataTable
Private Sub latihan44_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim a As New OleDb.OleDbDataAdapter
a = New OleDb.OleDbDataAdapter("select * from qpembelianperbulanan", nurul)
dt.Rows.Clear()
a.Fill(dt)
a.Dispose()
dgv.DataSource = dt
ilmi.ColumnCount = 3
ilmi.RowCount = dt.Rows.Count
Dim fikri As Integer = 0
For Each x As DataRow In dt.Rows
fikri += 1
ilmi.Row = fikri
ilmi.RowLabel = x("bulan")
ilmi.Column = 1
ilmi.Data = x("unit")
ilmi.Column = 2
ilmi.Data = x("rata-rata harga") / 1000
ilmi.Column = 3
ilmi.Data = x("jumlah") / 10000
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
ilmi.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
ilmi.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
ilmi.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
ilmi.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
ilmi.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
End Sub
End Class
Public Class Tugas44_36109067
BalasHapusDim v As New OleDb.OleDbConnection("Provider=microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb")
Dim dt As New DataTable
Private Sub Tugas44_36109067_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim X As New OleDb.OleDbDataAdapter
X = New OleDb.OleDbDataAdapter("Select * From QPembelianPerBulanan", v)
X.Fill(dt)
X.Dispose()
dgv067.DataSource = dt
'Membuat grafik'
chart067.ColumnCount = 3
chart067.RowCount = dt.Rows.Count
'Membuat tabel dalam grafik'
Dim PB As Integer = 0
For Each ina As DataRow In dt.Rows
PB = PB + 1
chart067.Row = PB
chart067.RowLabel = ina("BULAN")
chart067.Column = 1
chart067.Data = ina("UNIT")
chart067.Column = 2
chart067.Data = ina("RATA-RATA HARGA") / 1000
chart067.Column = 3
chart067.Data = ina("JUMLAH") / 1000
Next
End Sub
Private Sub GB_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GB.Click
'Mengubah tipe grafik'
chart067.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
End Sub
Private Sub GL_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GL.Click
'Mengubah tipe grafik'
chart067.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
End Sub
Private Sub GLng_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GLng.Click
'Mengubah tipe grafik'
chart067.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
End Sub
Private Sub GB2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GB2.Click
'Mengubah tipe grafik'
chart067.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
End Sub
Private Sub GL3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GL3.Click
'Mengubah tipe grafik'
chart067.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
End Sub
End Class