private static Geometry GetPointGeometry(ScatterMarkerSymbol symbol)
        {
            switch (symbol)
            {
            case ScatterMarkerSymbol.None:
                return(DefaultGeometries.None);

            case ScatterMarkerSymbol.Circle:
                return(DefaultGeometries.Circle);

            case ScatterMarkerSymbol.Diamond:
                return(DefaultGeometries.Diamond);

            case ScatterMarkerSymbol.Square:
                return(DefaultGeometries.Square);

            case ScatterMarkerSymbol.Triangle:
                return(DefaultGeometries.Triangle);

            case ScatterMarkerSymbol.TriangleDown:
                return(Geometries.TriangleDown);

            default:
                return(DefaultGeometries.Circle);
            }
        }
        private static GeometryShape GetGearedPointGeometry(ScatterMarkerSymbol symbol)
        {
            switch (symbol)
            {
            case ScatterMarkerSymbol.None:
                return(null);

            case ScatterMarkerSymbol.Circle:
                return(new Circle());

            case ScatterMarkerSymbol.Square:
                return(new Square());

            case ScatterMarkerSymbol.Diamond:
                return(new Diamond());

            case ScatterMarkerSymbol.Triangle:
                return(new Triangle());

            case ScatterMarkerSymbol.TriangleDown:
                return(new TriangleDown());

            default:
                throw new ArgumentOutOfRangeException(nameof(symbol), symbol, null);
            }
        }
Esempio n. 3
0
        private static QuantConnect.ScatterMarkerSymbol MapToQuantConnectScatterMarkerSymbol(this ScatterMarkerSymbol symbol)
        {
            switch (symbol)
            {
            case ScatterMarkerSymbol.None:
                return(QuantConnect.ScatterMarkerSymbol.None);

            case ScatterMarkerSymbol.Circle:
                return(QuantConnect.ScatterMarkerSymbol.Circle);

            case ScatterMarkerSymbol.Square:
                return(QuantConnect.ScatterMarkerSymbol.Square);

            case ScatterMarkerSymbol.Diamond:
                return(QuantConnect.ScatterMarkerSymbol.Diamond);

            case ScatterMarkerSymbol.Triangle:
                return(QuantConnect.ScatterMarkerSymbol.Triangle);

            case ScatterMarkerSymbol.TriangleDown:
                return(QuantConnect.ScatterMarkerSymbol.TriangleDown);

            default:
                throw new NotSupportedException($"ScatterMarkerSymbol {symbol} is not supported.");
            }
        }