New conversion complete
This commit is contained in:
@@ -10,22 +10,19 @@ namespace LeafWeb.Web.Charter
|
||||
public static class LeafWebCharter
|
||||
{
|
||||
// cntrlcomparison
|
||||
public static IEnumerable<Chart> ProduceCharts(List<CurveData> curveData)
|
||||
public static IEnumerable<Chart> ProduceCharts(CurveData curve)
|
||||
{
|
||||
var curve = curveData[1]; // TODO: why is only the [1] used?
|
||||
|
||||
var curveId = curve.CurveId;
|
||||
|
||||
var fcfc = CurveSeries(curveId, curve.FixedCndFixedCmp,
|
||||
"Internal conductance fixed, compensation point and M-M constants fixed");
|
||||
var fcec = CurveSeries(curveId, curve.FixedCndEstimatedCmp,
|
||||
"Internal conductance fixed, compensation point and M-M constants estimated");
|
||||
var ecfc = CurveSeries(curveId, curve.EstimatedCndFixedCmp,
|
||||
"Internal conductance estimated, compensation point and M-M constants fixed");
|
||||
var ecec = CurveSeries(curveId, curve.EstimatedCndEstimatedCmp,
|
||||
"Internal conductance estimated, compensation point and M-M constants estimated");
|
||||
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 new[] {fcfc, fcec, ecfc, ecec}.SelectMany(c => c);
|
||||
return paramTitles.SelectMany(item => CurveSeries(curveId, item.param, item.title));
|
||||
}
|
||||
|
||||
private static IEnumerable<Chart> CurveSeries(string curveId, CurveParamSet paramSet, string chartTitle)
|
||||
@@ -33,54 +30,36 @@ namespace LeafWeb.Web.Charter
|
||||
var chloroChart = GetChart("Chloroplastic CO2 partial pressure (Pa)");
|
||||
var interChart = GetChart("Intercellular CO2 partial pressure (Pa)");
|
||||
|
||||
var anetMeasChloro1 = paramSet.AnetMeasChloro1Data;
|
||||
var anetMeasChloro2 = paramSet.AnetMeasChloro2Data;
|
||||
var anetMeasChloro3 = paramSet.AnetMeasChloro3Data;
|
||||
|
||||
// Set the points for the symbol series for paramater set 1, chloroplastic
|
||||
SetAnetMeasPoints(anetMeasChloro1, chloroChart.Series["Rubisco-limited"]);
|
||||
SetAnetMeasPoints(anetMeasChloro2, chloroChart.Series["RuBP regeneration-limited"]);
|
||||
SetAnetMeasPoints(paramSet.AnetMeasChloro1Data, chloroChart.Series["Rubisco-limited"]);
|
||||
SetAnetMeasPoints(paramSet.AnetMeasChloro2Data, chloroChart.Series["RuBP regeneration-limited"]);
|
||||
|
||||
var tpuSeries = NewTpuSeries(anetMeasChloro3);
|
||||
SetAnetMeasPoints(anetMeasChloro3, tpuSeries);
|
||||
var tpuSeries = NewTpuSeries(paramSet.AnetMeasChloro3Data);
|
||||
SetAnetMeasPoints(paramSet.AnetMeasChloro3Data, tpuSeries);
|
||||
chloroChart.Series.Add(tpuSeries);
|
||||
|
||||
var anetMeasInter1 = paramSet.AnetMeasInter1Data;
|
||||
var anetMeasInter2 = paramSet.AnetMeasInter2Data;
|
||||
var anetMeasInter3 = paramSet.AnetMeasInter3Data;
|
||||
|
||||
// Set the points for the symbol series for paramater set 1, intercellular
|
||||
SetAnetMeasPoints(anetMeasInter1, interChart.Series["Rubisco-limited"]);
|
||||
SetAnetMeasPoints(anetMeasInter2, interChart.Series["RuBP regeneration-limited"]);
|
||||
SetAnetMeasPoints(paramSet.AnetMeasInter1Data, interChart.Series["Rubisco-limited"]);
|
||||
SetAnetMeasPoints(paramSet.AnetMeasInter2Data, interChart.Series["RuBP regeneration-limited"]);
|
||||
|
||||
tpuSeries = NewTpuSeries(anetMeasInter3);
|
||||
SetAnetMeasPoints(anetMeasInter3, tpuSeries);
|
||||
tpuSeries = NewTpuSeries(paramSet.AnetMeasInter3Data);
|
||||
SetAnetMeasPoints(paramSet.AnetMeasInter3Data, tpuSeries);
|
||||
interChart.Series.Add(tpuSeries);
|
||||
|
||||
var acChloroList = paramSet.AcChloroData;
|
||||
var ajChloroList = paramSet.AjChloroData;
|
||||
var atChloroList = paramSet.AtChloroData;
|
||||
|
||||
// Set the points on the asymptote curve for parameter set 1, chloroplast
|
||||
SetAsymptotePoints(acChloroList, chloroChart.Series["acCurve"]);
|
||||
SetAsymptotePoints(ajChloroList, chloroChart.Series["ajCurve"]);
|
||||
SetAsymptotePoints(atChloroList, chloroChart.Series["atCurve"]);
|
||||
|
||||
var acInterList = paramSet.AcInterData;
|
||||
var ajInterList = paramSet.AjInterData;
|
||||
var atInterList = paramSet.AtInterData;
|
||||
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(acInterList, interChart.Series["acCurve"]);
|
||||
SetAsymptotePoints(ajInterList, interChart.Series["ajCurve"]);
|
||||
SetAsymptotePoints(atInterList, interChart.Series["atCurve"]);
|
||||
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};
|
||||
var title = new Title($"LeafWeb curveID = {curveId}\n{chartTitle}"){Font = titleFont};
|
||||
chloroChart.Titles.Add(title);
|
||||
interChart.Titles.Add(title);
|
||||
|
||||
@@ -89,6 +68,7 @@ namespace LeafWeb.Web.Charter
|
||||
|
||||
interChart.ChartAreas["ChartArea1"].AxisX.TitleFont = axisFont;
|
||||
interChart.ChartAreas["ChartArea1"].AxisY.TitleFont = axisFont;
|
||||
|
||||
yield return chloroChart;
|
||||
yield return interChart;
|
||||
}
|
||||
@@ -196,7 +176,7 @@ namespace LeafWeb.Web.Charter
|
||||
}
|
||||
});
|
||||
|
||||
var rubiscoLimited = new Series
|
||||
chart.Series.Add(new Series
|
||||
{
|
||||
MarkerSize = 8,
|
||||
BorderWidth = 3,
|
||||
@@ -209,10 +189,9 @@ namespace LeafWeb.Web.Charter
|
||||
Color = Color.Red,
|
||||
ShadowOffset = 0,
|
||||
YValueType = ChartValueType.Double
|
||||
};
|
||||
chart.Series.Add(rubiscoLimited);
|
||||
});
|
||||
|
||||
var rubpRegenerationLimited = new Series
|
||||
chart.Series.Add(new Series
|
||||
{
|
||||
MarkerSize = 9,
|
||||
BorderWidth = 3,
|
||||
@@ -225,10 +204,9 @@ namespace LeafWeb.Web.Charter
|
||||
Color = Color.Blue,
|
||||
ShadowOffset = 0,
|
||||
YValueType = ChartValueType.Double
|
||||
};
|
||||
chart.Series.Add(rubpRegenerationLimited);
|
||||
});
|
||||
|
||||
var acCurve = new Series
|
||||
chart.Series.Add(new Series
|
||||
{
|
||||
MarkerSize = 2,
|
||||
BorderWidth = 1,
|
||||
@@ -242,10 +220,9 @@ namespace LeafWeb.Web.Charter
|
||||
ShadowOffset = 0,
|
||||
YValueType = ChartValueType.Double,
|
||||
IsVisibleInLegend = false
|
||||
};
|
||||
chart.Series.Add(acCurve);
|
||||
});
|
||||
|
||||
var ajCurve = new Series
|
||||
chart.Series.Add(new Series
|
||||
{
|
||||
MarkerSize = 2,
|
||||
BorderWidth = 1,
|
||||
@@ -259,10 +236,9 @@ namespace LeafWeb.Web.Charter
|
||||
ShadowOffset = 0,
|
||||
YValueType = ChartValueType.Double,
|
||||
IsVisibleInLegend = false
|
||||
};
|
||||
chart.Series.Add(ajCurve);
|
||||
});
|
||||
|
||||
var atCurve = new Series
|
||||
chart.Series.Add(new Series
|
||||
{
|
||||
MarkerSize = 2,
|
||||
BorderWidth = 1,
|
||||
@@ -276,8 +252,7 @@ namespace LeafWeb.Web.Charter
|
||||
ShadowOffset = 0,
|
||||
YValueType = ChartValueType.Double,
|
||||
IsVisibleInLegend = false
|
||||
};
|
||||
chart.Series.Add(atCurve);
|
||||
});
|
||||
|
||||
return chart;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user