/// <summary> /// Convert an apsim legend orientation to an oxyplot legend orientation. /// </summary> /// <param name="orientation">An apsim legend orientation.</param> public static OxyLegendOrientation ToOxyPlotLegendOrientation(this LegendOrientation orientation) { switch (orientation) { case LegendOrientation.Horizontal: return(OxyLegendOrientation.Horizontal); case LegendOrientation.Vertical: return(OxyLegendOrientation.Vertical); default: throw new NotImplementedException($"Unknown legend orientation: {orientation}"); } }
public void TestLegendOrientationConversion(LegendOrientation input, OxyPlot.Legends.LegendOrientation expectedOutput) { Assert.AreEqual(expectedOutput, input.ToOxyPlotLegendOrientation()); }