public void BuildCharts(string criteria, string math) { CSS Director = new CSS(); //get event info Event theEvent = new Event(); theEvent.EventID = ((Event)Session["Event"]).EventID; theEvent = Director.GetEvent(theEvent); theEvent.Evaluators = Director.GetEvaluatorsForEvent(theEvent.EventID); DateTime defaultTime = Convert.ToDateTime("1800-01-01 12:00:00 PM"); if (criteria != "All Evaluations") { theEvent.Evaluators.RemoveAll(o => o.Criteria != criteria); } foreach (Evaluator ev in theEvent.Evaluators) { ev.EvaluatorEvaluations.RemoveAll(x => x.Rating == 999); } //if event has evaluator data, construct the chart if (theEvent.Evaluators.Count > 0) { Highcharts chart = Director.CreateChart(theEvent); ltrChart.Text = chart.ToHtmlString(); //generate chart with mean/mode/median Highcharts mathChart = Director.MakeMathChart(theEvent, math); meanChart.Text = mathChart.ToHtmlString(); } }