diff --git a/Core.Tests/Core.Tests.csproj b/Core.Tests/Core.Tests.csproj
index e690e4e..60c0b47 100644
--- a/Core.Tests/Core.Tests.csproj
+++ b/Core.Tests/Core.Tests.csproj
@@ -48,7 +48,6 @@
-
diff --git a/Core.Tests/Parsers/CurveDataListTests.cs b/Core.Tests/Parsers/CurveDataListTests.cs
deleted file mode 100644
index dcac827..0000000
--- a/Core.Tests/Parsers/CurveDataListTests.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using LeafWeb.Core.CharterOld;
-using NUnit.Framework;
-
-namespace LeafWeb.Core.Tests.Parsers
-{
- [TestFixture]
- public class CurveDataListTests
- {
- private const string ContentDirectory = @"Parsers\LeafOutputData\";
-
- [Test]
- public void Parse_Valid()
- {
- var fileInfo = FileUtility.GetContentFile(ContentDirectory, "cntrlcomparison_Wild Capsicum.csv");
- var cntrlComparison = new CurveDataList();
- using (var reader = fileInfo.OpenText())
- {
- cntrlComparison.ReadFromStream(reader);
- }
- Assert.That(cntrlComparison.CurveData.Count, Is.EqualTo(7));
- }
- }
-}
diff --git a/Core/Charter/CurveDataConverter.cs b/Core/Charter/CurveDataConverter.cs
index d40db56..024c110 100644
--- a/Core/Charter/CurveDataConverter.cs
+++ b/Core/Charter/CurveDataConverter.cs
@@ -6,7 +6,7 @@ using LeafWeb.Core.Utility;
namespace LeafWeb.Core.Charter
{
- public class CurveDataConverter
+ public static class CurveDataConverter
{
public static IEnumerable Convert(IEnumerable cntrlComparison)
{
@@ -54,7 +54,7 @@ namespace LeafWeb.Core.Charter
curveData.EstimatedCndEstimatedCmp = paramSet;
}
- // Check all data is present
+ // guarantee all data is present
if (curveData.FixedCndFixedCmp == null)
throw new ArgumentException(
$"{comparisonGroup.CurveID} missing data for {ReflectionExtensions.GetPropertyDisplayName(c=>c.FixedCndFixedCmp)}");
diff --git a/Core/CharterOld/CurveData.cs b/Core/CharterOld/CurveData.cs
deleted file mode 100644
index 64a2233..0000000
--- a/Core/CharterOld/CurveData.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using System.IO;
-
-namespace LeafWeb.Core.CharterOld
-{
- public class CurveData
- {
- private readonly string _curveId;
-
- public string CurveId => _curveId;
-
- // 1
- public CurveParamSet FixedCndFixedCmp { get; }
-
- // 2
- public CurveParamSet FixedCndEstimatedCmp { get; }
-
- // 3
- public CurveParamSet EstimatedCndFixedCmp { get; }
-
- // 4
- public CurveParamSet EstimatedCndEstimatedCmp { get; }
-
-
- public CurveData(TextReader sr, ref int lineNbr)
- {
- // For each curve in the output file there are four sets of data.
-
- FixedCndFixedCmp = new CurveParamSet(sr, ref lineNbr, ref _curveId);
-
- FixedCndEstimatedCmp = new CurveParamSet(sr, ref lineNbr, ref _curveId);
-
- EstimatedCndFixedCmp = new CurveParamSet(sr, ref lineNbr, ref _curveId);
-
- EstimatedCndEstimatedCmp = new CurveParamSet(sr, ref lineNbr, ref _curveId);
- }
- }
-}
\ No newline at end of file
diff --git a/Core/CharterOld/CurveDataList.cs b/Core/CharterOld/CurveDataList.cs
deleted file mode 100644
index 1421a4e..0000000
--- a/Core/CharterOld/CurveDataList.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-using System.Collections.Generic;
-using System.IO;
-
-namespace LeafWeb.Core.CharterOld
-{
- public class CurveDataList
- {
- // Each element will be a PiscalCurve element that contains
- // all of the output data for one curve.
- public List CurveData { get; }
-
- public CurveDataList()
- {
- CurveData = new List();
- }
-
- public bool ReadFromStream(StreamReader sr)
- {
- // Skip the first two lines.
- sr.ReadLine();
- sr.ReadLine();
- var lineNbr = 2;
-
- // Now, there should be one or more rows, delimited by a row that has
- // CO2i in the first field. Read in all of these rows. The first field
- // in each row is the curve ID (input filename).
-
- var more = true;
- while (more)
- {
- var curve = new CurveData(sr, ref lineNbr);
-
- CurveData.Add(curve);
-
- if (sr.EndOfStream)
- more = false;
- }
- return true;
- }
- }
-
-}
\ No newline at end of file
diff --git a/Core/CharterOld/CurveParamSet.cs b/Core/CharterOld/CurveParamSet.cs
deleted file mode 100644
index a94d6fd..0000000
--- a/Core/CharterOld/CurveParamSet.cs
+++ /dev/null
@@ -1,166 +0,0 @@
-using System.Collections.Generic;
-using System.IO;
-using LeafWeb.Core.Utility;
-
-namespace LeafWeb.Core.CharterOld
-{
- public class CurveParamSet
- {
- public List AnetMeasChloro1Data { get; } = new List(); // y=AnetMeas column, x=PCO2c, for PointLimitType=1
- public List AnetMeasChloro2Data { get; } = new List(); // y=AnetMeas column, x=PCO2c, for PointLimitType=2
- public List AnetMeasChloro3Data { get; } = new List(); // y=AnetMeas column, x=PCO2c, for PointLimitType=3
- public List AnetMeasInter1Data { get; } = new List(); // y=AnetMeas column, x=PCO2i, for PointLimitType=1
- public List AnetMeasInter2Data { get; } = new List(); // y=AnetMeas column, x=PCO2i, for PointLimitType=2
- public List AnetMeasInter3Data { get; } = new List(); // y=AnetMeas column, x=PCO2i, for PointLimitType=3
-
- public List AcChloroData { get; } = new List();
- public List AjChloroData { get; } = new List();
- public List AtChloroData { get; } = new List();
- public List AcInterData { get; } = new List();
- public List AjInterData { get; } = new List();
- public List AtInterData { get; } = new List();
-
- public CurveParamSet(TextReader sr, ref int lineNbr, ref string curveId)
- {
- bool curveIdSet = false, doneWithAnet = false;
- string line;
- List phrases;
-
- while (!doneWithAnet)
- {
- lineNbr++;
- line = sr.ReadLine();
- if (line == null)
- {
- throw new ParseException("Unexpected end-of-file at line " + lineNbr);
- }
-
- phrases = SplitCsvLine(line);
-
- var firstField = phrases[0];
- if (firstField.Equals("CO2i"))
- {
- doneWithAnet = true;
- }
- else
- {
- // The fields on the line:
- // Column Name
- // 0 CurveID
- // 1 ChlFlUse
- // 2 FitGi
- // 3 FitGamma
- // 4 FitKco
- // 5 FitRd
- // 6 FitAlpha
- // 7 LimitCombina
- // 8 PCO2i
- // 9 PCO2c
- // 10 AnetMeas
- // 11 AnetCal
- // 12 weitedrms
- // 13 PointLimitType
-
- if (!curveIdSet)
- {
- curveId = firstField;
- curveIdSet = true;
- }
- var xyPoint1 = new XyPoint(phrases[9], phrases[10]); // AnetMeas(y), PCO2c(x)
- var xyPoint2 = new XyPoint(phrases[8], phrases[10]);
- var pointLimitType = int.Parse(phrases[13]);
- switch (pointLimitType)
- {
- case 1:
- AnetMeasChloro1Data.Add(xyPoint1);
- AnetMeasInter1Data.Add(xyPoint2);
- break;
- case 2:
- AnetMeasChloro2Data.Add(xyPoint1);
- AnetMeasInter2Data.Add(xyPoint2);
- break;
- case 3:
- AnetMeasChloro3Data.Add(xyPoint1);
- AnetMeasInter3Data.Add(xyPoint2);
- break;
- }
- }
- }
-
- // The next set of lines will have three pairs of x,y-coordinates to save.
- // A blank line signals the end of the data.
-
- var moreData = true;
- while (moreData)
- {
- // The fields on the line:
- // Column Name
- // 0 CO2i
- // 1 CO2cc
- // 2 Ac
- // 3 CO2cj
- // 4 Aj
- // 5 CO2ct
- // 6 At
-
- lineNbr++;
- line = sr.ReadLine();
- if (line == null)
- {
- throw new ParseException("Unexpected end-of-file at line " + lineNbr);
- }
-
- if (line.Length == 0)
- moreData = false;
- else
- {
- phrases = SplitCsvLine(line);
- var xyPoint1 = new XyPoint(phrases[1],phrases[2]); // Ac(y),CO2cc(x)
- if (xyPoint1.YIsInRange(-20.0, 50.0))
- AcChloroData.Add(xyPoint1);
- xyPoint1 = new XyPoint(phrases[3], phrases[4]); // Aj(y),CO2cj(x)
- if (xyPoint1.YIsInRange(-20.0, 50.0))
- AjChloroData.Add(xyPoint1);
- xyPoint1 = new XyPoint(phrases[5], phrases[6]); // At(y),CO2ct(x)
- if (xyPoint1.YIsInRange(-20.0, 50.0))
- AtChloroData.Add(xyPoint1);
-
- xyPoint1 = new XyPoint(phrases[0], phrases[2]); // Ac(y),CO2i(x)
- if (xyPoint1.YIsInRange(-20.0, 50.0))
- AcInterData.Add(xyPoint1);
- xyPoint1 = new XyPoint(phrases[0], phrases[4]); // Aj(y),CO2i(x)
- if (xyPoint1.YIsInRange(-20.0, 50.0))
- AjInterData.Add(xyPoint1);
- xyPoint1 = new XyPoint(phrases[0], phrases[6]); // At(y),CO2i(x)
- if (xyPoint1.YIsInRange(-20.0, 50.0))
- AtInterData.Add(xyPoint1);
- }
- }
- }
-
- ///
- /// This method assumes that the argument is a comma-, blank-, or
- /// tab-separated set of strings. It returns an ArrayList of those
- /// quantities. Consecutive commas will be returned as an empty string,
- /// but all empty strings at the end of the line will be thrown away.
- ///
- ///
- ///
- private static List SplitCsvLine(string line)
- {
- int i;
- var separator = new [] {',', ' ', '\t'};
- var phrases = line.Split(separator);
-
- var retPhrases = new List();
- for (i = 0; i < phrases.Length; i++)
- {
- var phrase = phrases[i].Trim();
- if (phrase.Length > 0)
- retPhrases.Add(phrase);
- }
-
- return retPhrases;
- }
- }
-}
\ No newline at end of file
diff --git a/Core/CharterOld/XYPoint.cs b/Core/CharterOld/XYPoint.cs
deleted file mode 100644
index 265add8..0000000
--- a/Core/CharterOld/XYPoint.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-namespace LeafWeb.Core.CharterOld
-{
- public class XyPoint
- {
- public XyPoint(string x, string y)
- {
- X = double.Parse(x);
- Y = double.Parse(y);
- }
-
- public double X { get; private set; }
-
- public double Y { get; private set; }
-
- public bool YIsInRange(double lowEnd, double highEnd)
- {
- return (Y >= lowEnd) && (Y <= highEnd);
- }
- }
-}
\ No newline at end of file
diff --git a/Core/Core.csproj b/Core/Core.csproj
index 441170b..b595753 100644
--- a/Core/Core.csproj
+++ b/Core/Core.csproj
@@ -63,15 +63,11 @@
-
-
-
-
diff --git a/Core/Parsers/CsvParserBase.cs b/Core/Parsers/CsvParserBase.cs
index 5fd31e9..a71f428 100644
--- a/Core/Parsers/CsvParserBase.cs
+++ b/Core/Parsers/CsvParserBase.cs
@@ -19,7 +19,7 @@ namespace LeafWeb.Core.Parsers
throw new FileNotFoundException($"Cannot find file '{csvFile.Name}'");
_reader = File.OpenText(csvFile.FullName);
- var csvConfiguration = new CsvConfiguration { HasHeaderRecord = false, IgnoreBlankLines = false};
+ var csvConfiguration = new CsvConfiguration { HasHeaderRecord = false, IgnoreBlankLines = false, IgnoreReadingExceptions = true};
CsvReader = new CsvReader(_reader, csvConfiguration);
}
@@ -29,16 +29,7 @@ namespace LeafWeb.Core.Parsers
if (!CsvReader.Read())
return null;
- // put all the values from this row into an array
- var values = new List();
- var index = 0;
- string value;
- while (CsvReader.TryGetField(index, out value))
- {
- values.Add(value);
- index++;
- }
- return values.ToArray();
+ return CsvReader.CurrentRecord;
}
public void Dispose()
diff --git a/Core/Utility/ReflectionExtensions.cs b/Core/Utility/ReflectionExtensions.cs
index 2ac1fe2..0dfd48f 100644
--- a/Core/Utility/ReflectionExtensions.cs
+++ b/Core/Utility/ReflectionExtensions.cs
@@ -1,4 +1,5 @@
using System;
+using System.Collections.Concurrent;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
@@ -8,6 +9,26 @@ using Fasterflect;
namespace LeafWeb.Core.Utility
{
+ public static class MemoizationExtensions
+ {
+ static Func ThreadsafeMemoize(this Func f)
+ {
+ var cache = new ConcurrentDictionary();
+
+ return argument => cache.GetOrAdd(argument, f);
+ }
+ //static Func ThreadsafeMemoize(this Func f)
+ //{
+ // var cache = new ConcurrentDictionary>();
+
+ // return (a, b) =>
+ // {
+
+ // return cache.GetOrAdd(a, new ConcurrentDictionary()).GetOrAdd(b, f);
+
+ // };
+ //}
+ }
public static class ReflectionExtensions
{
public static string GetPropertyDisplayName(Expression> propertyExpression)
diff --git a/LeafWeb.sln b/LeafWeb.sln
index 763ac46..e4ee6e6 100644
--- a/LeafWeb.sln
+++ b/LeafWeb.sln
@@ -12,9 +12,6 @@ EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core.Tests", "Core.Tests\Core.Tests.csproj", "{8207F6FE-EA80-41CA-81B5-ACD020FB0F3C}"
EndProject
Global
- GlobalSection(Performance) = preSolution
- HasPerformanceSessions = true
- EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
diff --git a/Web/Charter/LeafWebCharterOld.cs b/Web/Charter/LeafWebCharterOld.cs
deleted file mode 100644
index fa5dd13..0000000
--- a/Web/Charter/LeafWebCharterOld.cs
+++ /dev/null
@@ -1,262 +0,0 @@
-using System.Collections.Generic;
-using System.Drawing;
-using System.Linq;
-using System.Web.UI.DataVisualization.Charting;
-using System.Web.UI.WebControls;
-using CurveData = LeafWeb.Core.CharterOld.CurveData;
-using CurveParamSet = LeafWeb.Core.CharterOld.CurveParamSet;
-using XyPoint = LeafWeb.Core.CharterOld.XyPoint;
-
-namespace LeafWeb.Web.Charter
-{
- public static class LeafWebCharterOld
- {
- // cntrlcomparison
- public static IEnumerable ProduceCharts(CurveData curve)
- {
- var curveId = curve.CurveId;
-
- var paramTitles = new[]
- {
- new {param = curve.FixedCndFixedCmp, title = "Internal conductance fixed, compensation point and M-M constants fixed" },
- new {param = curve.FixedCndEstimatedCmp, title = "Internal conductance fixed, compensation point and M-M constants estimated" },
- new {param = curve.EstimatedCndFixedCmp, title = "Internal conductance estimated, compensation point and M-M constants fixed" },
- new {param = curve.EstimatedCndEstimatedCmp,title = "Internal conductance estimated, compensation point and M-M constants estimated" },
- };
-
- return paramTitles.SelectMany(item => CurveSeries(curveId, item.param, item.title));
- }
-
- private static IEnumerable CurveSeries(string curveId, CurveParamSet paramSet, string chartTitle)
- {
- var chloroChart = GetChart("Chloroplastic CO2 partial pressure (Pa)");
- var interChart = GetChart("Intercellular CO2 partial pressure (Pa)");
-
- // Set the points for the symbol series for paramater set 1, chloroplastic
- SetAnetMeasPoints(paramSet.AnetMeasChloro1Data, chloroChart.Series["Rubisco-limited"]);
- SetAnetMeasPoints(paramSet.AnetMeasChloro2Data, chloroChart.Series["RuBP regeneration-limited"]);
-
- var tpuSeries = NewTpuSeries(paramSet.AnetMeasChloro3Data);
- SetAnetMeasPoints(paramSet.AnetMeasChloro3Data, tpuSeries);
- chloroChart.Series.Add(tpuSeries);
-
- // Set the points for the symbol series for paramater set 1, intercellular
- SetAnetMeasPoints(paramSet.AnetMeasInter1Data, interChart.Series["Rubisco-limited"]);
- SetAnetMeasPoints(paramSet.AnetMeasInter2Data, interChart.Series["RuBP regeneration-limited"]);
-
- tpuSeries = NewTpuSeries(paramSet.AnetMeasInter3Data);
- SetAnetMeasPoints(paramSet.AnetMeasInter3Data, tpuSeries);
- interChart.Series.Add(tpuSeries);
-
- // Set the points on the asymptote curve for parameter set 1, chloroplast
- SetAsymptotePoints(paramSet.AcChloroData, chloroChart.Series["acCurve"]);
- SetAsymptotePoints(paramSet.AjChloroData, chloroChart.Series["ajCurve"]);
- SetAsymptotePoints(paramSet.AtChloroData, chloroChart.Series["atCurve"]);
-
- // Set the points on the asymptote curve for parameter set 1, intercellular
- SetAsymptotePoints(paramSet.AcInterData, interChart.Series["acCurve"]);
- SetAsymptotePoints(paramSet.AjInterData, interChart.Series["ajCurve"]);
- SetAsymptotePoints(paramSet.AtInterData, interChart.Series["atCurve"]);
-
- var axisFont = new Font("Times New Roman", 12, FontStyle.Bold);
- var titleFont = new Font("Times New Roman", 12, FontStyle.Bold);
-
- var title = new Title($"LeafWeb curveID = {curveId}\n{chartTitle}"){Font = titleFont};
- chloroChart.Titles.Add(title);
- interChart.Titles.Add(title);
-
- chloroChart.ChartAreas["ChartArea1"].AxisX.TitleFont = axisFont;
- chloroChart.ChartAreas["ChartArea1"].AxisY.TitleFont = axisFont;
-
- interChart.ChartAreas["ChartArea1"].AxisX.TitleFont = axisFont;
- interChart.ChartAreas["ChartArea1"].AxisY.TitleFont = axisFont;
-
- yield return chloroChart;
- yield return interChart;
- }
-
- private static Series NewTpuSeries(IReadOnlyCollection data)
- {
- var seriesName = "TPU-limited";
- if (data.Count == 0)
- seriesName = "Curve Asymptote";
- var series3 = new Series(seriesName)
- {
- MarkerSize = 9,
- BorderWidth = 3,
- XValueType = ChartValueType.Double,
- ChartType = SeriesChartType.Point,
- MarkerStyle = MarkerStyle.Square,
- ShadowColor = Color.Black,
- BorderColor = Color.Black,
- Color = Color.Orange,
- ShadowOffset = 0,
- YValueType = ChartValueType.Double
- };
-
- return series3;
- }
-
- private static void SetAnetMeasPoints(List data, Series series)
- {
- // Set the points for the series from the ArrayList
- foreach (var xy in data)
- {
- series.Points.AddXY(xy.X, xy.Y);
- }
- }
-
- private static void SetAsymptotePoints(List data, Series series)
- {
- // Set the points for the series from the ArrayList
- foreach (var xy in data)
- {
- if ((xy.X != -9999) && (xy.Y != -9999))
- {
- series.Points.AddXY(xy.X, xy.Y);
- }
- }
- }
-
- private static Chart GetChart(string axisXTitle, int width=700, int height=500)
- {
- var font = new Font(new FontFamily("Trebuchet MS"), 12, FontStyle.Bold);
-
- var borderColor = Color.FromArgb(180, 26, 59, 105);
- var chart = new Chart
- {
- BackColor = Color.White,
- Width = Unit.Pixel(width),
- Height = Unit.Pixel(height),
- BorderSkin = {SkinStyle = BorderSkinStyle.Emboss},
- BorderColor = borderColor
- };
-
- chart.Legends.Add(new Legend
- {
- Enabled = true,
- IsTextAutoFit = false,
- Name = "Default",
- Docking = Docking.Bottom,
- BackColor = Color.Transparent,
- Font = font
- });
-
- chart.ChartAreas.Add(new ChartArea
- {
- Name = "ChartArea1",
- BorderColor = Color.FromArgb(64, 64, 64, 64),
- BorderDashStyle = ChartDashStyle.Solid,
- BackSecondaryColor = Color.White,
- BackColor = Color.OldLace,
- ShadowColor = Color.Transparent,
- BackGradientStyle = GradientStyle.TopBottom,
- Area3DStyle = new ChartArea3DStyle
- {
- Rotation = 25,
- Perspective = 9,
- LightStyle = LightStyle.Realistic,
- Inclination = 40,
- IsRightAngleAxes = false,
- WallWidth = 3,
- IsClustered = false
- },
- AxisY = new Axis
- {
- LineColor = Color.FromArgb(64, 64, 64, 64),
- Title = "Net assimilation rate (umol/m2/s)",
- LabelStyle = {Font = font},
- MajorGrid = new Grid {LineColor = Color.FromArgb(64, 64, 64, 64)}
- },
- AxisX = new Axis
- {
- LineColor = Color.FromArgb(64, 64, 64, 64),
- Minimum = 0,
- Title = axisXTitle,
- LabelStyle = {Font = font},
- MajorGrid = new Grid {LineColor = Color.FromArgb(64, 64, 64, 64)}
- }
- });
-
- chart.Series.Add(new Series
- {
- MarkerSize = 8,
- BorderWidth = 3,
- XValueType = ChartValueType.Double,
- Name = "Rubisco-limited",
- ChartType = SeriesChartType.Point,
- MarkerStyle = MarkerStyle.Diamond,
- ShadowColor = Color.Black,
- BorderColor = borderColor,
- Color = Color.Red,
- ShadowOffset = 0,
- YValueType = ChartValueType.Double
- });
-
- chart.Series.Add(new Series
- {
- MarkerSize = 9,
- BorderWidth = 3,
- XValueType = ChartValueType.Double,
- Name = "RuBP regeneration-limited",
- ChartType = SeriesChartType.Point,
- MarkerStyle = MarkerStyle.Circle,
- ShadowColor = Color.Black,
- BorderColor = borderColor,
- Color = Color.Blue,
- ShadowOffset = 0,
- YValueType = ChartValueType.Double
- });
-
- chart.Series.Add(new Series
- {
- MarkerSize = 2,
- BorderWidth = 1,
- XValueType = ChartValueType.Double,
- Name = "acCurve",
- ChartType = SeriesChartType.Line,
- MarkerStyle = MarkerStyle.None,
- ShadowColor = Color.Black,
- BorderColor = borderColor,
- Color = Color.Red,
- ShadowOffset = 0,
- YValueType = ChartValueType.Double,
- IsVisibleInLegend = false
- });
-
- chart.Series.Add(new Series
- {
- MarkerSize = 2,
- BorderWidth = 1,
- XValueType = ChartValueType.Double,
- Name = "ajCurve",
- ChartType = SeriesChartType.Line,
- MarkerStyle = MarkerStyle.None,
- ShadowColor = Color.Black,
- BorderColor = borderColor,
- Color = Color.Blue,
- ShadowOffset = 0,
- YValueType = ChartValueType.Double,
- IsVisibleInLegend = false
- });
-
- chart.Series.Add(new Series
- {
- MarkerSize = 2,
- BorderWidth = 1,
- XValueType = ChartValueType.Double,
- Name = "atCurve",
- ChartType = SeriesChartType.Line,
- MarkerStyle = MarkerStyle.None,
- ShadowColor = Color.Black,
- BorderColor = borderColor,
- Color = Color.Orange,
- ShadowOffset = 0,
- YValueType = ChartValueType.Double,
- IsVisibleInLegend = false
- });
-
- return chart;
- }
- }
-}
\ No newline at end of file
diff --git a/Web/Controllers/LeafCharterController.cs b/Web/Controllers/LeafCharterController.cs
index 44a9840..e46a90e 100644
--- a/Web/Controllers/LeafCharterController.cs
+++ b/Web/Controllers/LeafCharterController.cs
@@ -6,7 +6,6 @@ using System.Web.Mvc;
using System.Web.UI.DataVisualization.Charting;
using System.Web.UI.WebControls;
using LeafWeb.Core.Charter;
-using LeafWeb.Core.CharterOld;
using LeafWeb.Core.Models;
using LeafWeb.Core.Parsers;
using LeafWeb.Web.Charter;
@@ -30,26 +29,7 @@ namespace LeafWeb.Web.Controllers
var curveData = CurveDataConverter.Convert(cntrlComparison).ToArray();
- var charts = LeafWebCharter.ProduceCharts(curveData[1]);
-
- using (var ms = new MemoryStream())
- {
- charts.Skip(number).First().SaveImage(ms, ChartImageFormat.Png);
- ms.Seek(0, SeekOrigin.Begin);
-
- return File(ms.ToArray(), "image/png", "mychart.png");
- }
- }
-
- public ActionResult LeafChartsOld(int number)
- {
- var fileInfo = new FileInfo(@"C:\Users\poprhythm\Documents\code\LeafWeb\Core.Tests\Parsers\LeafOutputData\cntrlcomparison_Wild Capsicum.csv");
- var curveDataList = new CurveDataList();
- using (var reader = fileInfo.OpenText())
- {
- curveDataList.ReadFromStream(reader);
- }
- var charts = LeafWebCharterOld.ProduceCharts(curveDataList.CurveData[1]);
+ var charts = LeafWebCharter.ProduceCharts(curveData[2]);
using (var ms = new MemoryStream())
{
diff --git a/Web/Views/LeafCharter/Index.cshtml b/Web/Views/LeafCharter/Index.cshtml
index 317584d..3d42a7a 100644
--- a/Web/Views/LeafCharter/Index.cshtml
+++ b/Web/Views/LeafCharter/Index.cshtml
@@ -1,8 +1,8 @@
-@*
+
-
*@
\ No newline at end of file
+
\ No newline at end of file
diff --git a/Web/Web.csproj b/Web/Web.csproj
index 21117db..0344369 100644
--- a/Web/Web.csproj
+++ b/Web/Web.csproj
@@ -143,7 +143,6 @@
-