Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1796 serializer for residual vs time chart missing #1797

Merged
merged 2 commits into from
Nov 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/OSPSuite.Core/Chart/CurveOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@ public enum Symbols
Circle,
Diamond,
Triangle,
Square
Square,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding those new styles

InvertedTriangle,
Plus,
Cross,
Star,
Pentagon,
Hexagon,
ThinCross,
}

public enum InterpolationModes
Expand Down
17 changes: 15 additions & 2 deletions src/OSPSuite.Core/Serialization/Chart/CurveChartXmlSerializer.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
using System.Xml.Linq;
using OSPSuite.Core.Chart;
using OSPSuite.Core.Chart.Simulations;
using OSPSuite.Core.Serialization.Xml;

namespace OSPSuite.Core.Serialization.Chart
{
public abstract class CurveChartXmlSerializer<TCurveChart> : OSPSuiteXmlSerializer<TCurveChart> where TCurveChart: CurveChart
public abstract class CurveChartXmlSerializer<TCurveChart> : OSPSuiteXmlSerializer<TCurveChart> where TCurveChart : CurveChart
{
public override void PerformMapping()
{
Expand All @@ -31,6 +32,18 @@ protected override void TypedDeserialize(TCurveChart curveChart, XElement output

public class CurveChartXmlSerializer : CurveChartXmlSerializer<CurveChart>
{

}

public class SimulationPredictedVsObservedChartXmlSerializer : CurveChartXmlSerializer<SimulationPredictedVsObservedChart>
{
public override void PerformMapping()
{
base.PerformMapping();
Map(x => x.DeviationFoldValues);
}
}

public class SimulationResidualVsTimeChartSerializer : CurveChartXmlSerializer<SimulationResidualVsTimeChart>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This serializer was missing. A bit puzzled here as to how it's being saved in PKSim

{
}
}

This file was deleted.

16 changes: 16 additions & 0 deletions src/OSPSuite.UI/Binders/CurveBinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,7 @@ private static MarkerKind mapFrom(Symbols symbol)
switch (symbol)
{
case Symbols.None:
//We return an arbitrary symbol for none as it does not exist in DevExpress
return MarkerKind.Square;
case Symbols.Circle:
return MarkerKind.Circle;
Expand All @@ -497,6 +498,21 @@ private static MarkerKind mapFrom(Symbols symbol)
return MarkerKind.Triangle;
case Symbols.Square:
return MarkerKind.Square;
case Symbols.InvertedTriangle:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and the mapping

return MarkerKind.InvertedTriangle;
case Symbols.Plus:
return MarkerKind.Plus;
case Symbols.Cross:
return MarkerKind.Cross;
case Symbols.Star:
return MarkerKind.Star;
case Symbols.Pentagon:
return MarkerKind.Pentagon;
case Symbols.Hexagon:
return MarkerKind.Hexagon;
case Symbols.ThinCross:
return MarkerKind.ThinCross;

default:
throw new ArgumentOutOfRangeException(nameof(symbol));
}
Expand Down