Exemplo n.º 1
0
        /// <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}");
            }
        }
Exemplo n.º 2
0
 public void TestLegendOrientationConversion(LegendOrientation input, OxyPlot.Legends.LegendOrientation expectedOutput)
 {
     Assert.AreEqual(expectedOutput, input.ToOxyPlotLegendOrientation());
 }