private void callBusinessTier(string selectedRadioValue, DateTime fromDate) { lblTotalSales.Text = SalesBiz.getSalesData(selectedRadioValue, fromDate).ToString(); SalesChart.DataSource = SalesBiz.getSalesDataPrDish(selectedRadioValue, fromDate); //rebind the new dataset SalesChart.DataBind(); }
protected void UpdateChart() { //BUILD BAR CHART SalesChart.Series["Sales"].Points.Clear(); for (int i = 0; i < _MonthlySales.Count; i++) { DataPoint point = new DataPoint(SalesChart.Series["Sales"]); point.SetValueXY(((int)(i + 1)).ToString(), new object[] { (float)((decimal)_MonthlySales[i].GrandTotal) }); SalesChart.Series["Sales"].Points.Add(point); } SalesChart.DataBind(); }