public override List <string> CreateMetric() { base.CreateMetric(); List <string> returnList = new List <string>(); MOE.Common.Business.SignalPhaseCollection signalphasecollection = new MOE.Common.Business.SignalPhaseCollection(StartDate, EndDate, SignalID, false, SelectedBinSize, 9); string location = GetSignalLocation(); if (signalphasecollection.SignalPhaseList.Count > 0) { foreach (MOE.Common.Business.SignalPhase signalPhase in signalphasecollection.SignalPhaseList) { MOE.Common.Business.ArriveOnRedChart AoRChart = new MOE.Common.Business.ArriveOnRedChart(this, signalPhase); Chart chart = AoRChart.chart; //Create the File Name string chartName = CreateFileName(); var removethese = new List <Title>(); foreach (Title t in chart.Titles) { if (t.Text == "" || t.Text == null) { removethese.Add(t); } } foreach (Title t in removethese) { chart.Titles.Remove(t); } //Save an image of the chart chart.SaveImage(MetricFileLocation + chartName, System.Web.UI.DataVisualization.Charting.ChartImageFormat.Jpeg); returnList.Add(MetricWebPath + chartName); } } return(returnList); }
public override List <string> CreateMetric() { base.CreateMetric(); string location = GetSignalLocation(); MOE.Common.Business.SignalPhaseCollection signalphasecollection = new MOE.Common.Business.SignalPhaseCollection(StartDate, EndDate, SignalID, ShowPlanStatistics, SelectedBinSize, 8); foreach (MOE.Common.Business.SignalPhase signalPhase in signalphasecollection.SignalPhaseList) { MOE.Common.Business.DelayChart delayChart = new MOE.Common.Business.DelayChart(this, signalPhase); Chart chart = delayChart.chart; string chartName = CreateFileName(); var removethese = new List <Title>(); foreach (Title t in chart.Titles) { if (t.Text == "" || t.Text == null) { removethese.Add(t); } } foreach (Title t in removethese) { chart.Titles.Remove(t); } //Save an image of the chart chart.SaveImage(MetricFileLocation + chartName, System.Web.UI.DataVisualization.Charting.ChartImageFormat.Jpeg); ReturnList.Add(MetricWebPath + chartName); } return(ReturnList); }