/// <summary> /// This method fills the problem behavior chart with data from the database /// </summary> private void BindProblemBehaviorChart() { using (PyramidContext context = new PyramidContext()) { //Get the chart data for the past year var behaviorIncidentsByProblemBehavior = context.spGetBehaviorIncidentCountByProblemBehavior(string.Join(",", currentProgramRole.ProgramFKs), DateTime.Now.AddYears(-1), DateTime.Now) .ToList(); //Bind the chart to the data chartIncidentsByProblemBehavior.DataSource = behaviorIncidentsByProblemBehavior; chartIncidentsByProblemBehavior.DataBind(); } }