Hello Team,
Help me bind sales data to my line graph
// This is to get sales performance by Month on the Line Graph and the chart area public JsonResult GetSalesPerformanceOnGraph() { ASPNETMASTERPOSTEntities db = new ASPNETMASTERPOSTEntities(); var previousYear = (DateTime.Now.Year - 1); var sales = db.tblSales.ToList(); var salesByMonthAmount = (from a in sales where DateTime.Parse(a.OrderDate).Year > previousYear group a by DateTime.Parse(a.OrderDate).Month into g select g.Sum(c => c.TotalAmount)).ToArray();
var salesMonths = (from a in sales where DateTime.Parse(a.OrderDate).Year >
).ToList();
return Json(new , JsonRequestBehavior.AllowGet); }