private void loadChart() { String tahunSekarang = DateTime.Today.ToString("yyyy"); lblChartPembelian.Text += " " + tahunSekarang; for (int i = 1; i < 13; i++) { String monthIndex = i + ""; if (i < 10) { monthIndex = "0" + monthIndex; } String cmd = "select sum(total_harga)+0 from h_purchase_invoice where id_purchase_invoice like 'PI/" + tahunSekarang + "/" + monthIndex + "/%'"; String hasilQuery = new OracleCommand(cmd, conn).ExecuteScalar().ToString(); Int64 total = 0; if (!hasilQuery.Equals("")) { total = Convert.ToInt64(hasilQuery); } chartPembelian.Series["Total"].Points.AddXY(getMonth(i), total); } }