Cleanup - charter will now display arbitrary count of graphs

This commit is contained in:
2018-08-28 20:47:27 -04:00
parent ad41465c05
commit 590f2e68ef
4 changed files with 4 additions and 7 deletions
+2 -2
View File
@@ -78,7 +78,7 @@ namespace LeafWeb.WebCms.Controllers
return new HttpStatusCodeResult(HttpStatusCode.NotFound, $"Unhandled exception thrown wihle parsing {leafOutputFile.Filename}.");
}
if (curveData == null)
if (curveData == null || curveData.ParamSets.Count == 0)
return new HttpStatusCodeResult(HttpStatusCode.NotFound, $"No curve data was loaded from {leafOutputFile.Filename}.");
var charts = GetChartBitmaps(curveData).ToList();
@@ -104,7 +104,7 @@ namespace LeafWeb.WebCms.Controllers
LeafGasComparison[] leafGasComparisons;
using (var parser = new LeafGasComparisonParser(fileContents))
leafGasComparisons = parser.Parse(curveId);
return CurveDataConverter.Convert(leafGasComparisons).First();
return CurveDataConverter.Convert(leafGasComparisons).FirstOrDefault();
}
catch (Exception e)
{