コード例 #1
0
ファイル: Charting.cs プロジェクト: godtopus/Lean
 /// <summary>
 /// Foundational constructor on the series class
 /// </summary>
 /// <param name="name">Name of the series</param>
 /// <param name="type">Type of the series</param>
 /// <param name="index">Index position on the chart of the series</param>
 public Series(string name, SeriesType type, int index)
 {
     Name                = name;
     SeriesType          = type;
     Index               = index;
     Unit                = "$";
     Color               = Color.Empty;
     ScatterMarkerSymbol = ScatterMarkerSymbol.None;
 }
コード例 #2
0
ファイル: Charting.cs プロジェクト: makeyou0704/Lean
 /// <summary>
 /// Foundational constructor on the series class
 /// </summary>
 /// <param name="name">Name of the series</param>
 /// <param name="type">Type of the series</param>
 /// <param name="index">Index position on the chart of the series</param>
 /// <param name="unit">Unit for the series axis</param>
 public Series(string name, SeriesType type, int index, string unit)
 {
     Name                = name;
     SeriesType          = type;
     Index               = index;
     Unit                = unit;
     Color               = Color.Empty;
     ScatterMarkerSymbol = ScatterMarkerSymbol.Circle;
 }
コード例 #3
0
ファイル: Charting.cs プロジェクト: godtopus/Lean
 /// <summary>
 /// Constructor method for Chart Series
 /// </summary>
 /// <param name="name">Name of the chart series</param>
 public Series(string name)
 {
     Name                = name;
     SeriesType          = SeriesType.Line;
     Unit                = "$";
     Index               = 0;
     Color               = Color.Empty;
     ScatterMarkerSymbol = ScatterMarkerSymbol.None;
 }
コード例 #4
0
ファイル: Charting.cs プロジェクト: makeyou0704/Lean
 /// <summary>
 /// Foundational constructor on the series class
 /// </summary>
 /// <param name="name">Name of the series</param>
 /// <param name="type">Type of the series</param>
 public Series(string name, SeriesType type)
 {
     Name                = name;
     SeriesType          = type;
     Index               = 0;
     Unit                = "$";
     Color               = Color.Empty;
     ScatterMarkerSymbol = ScatterMarkerSymbol.Circle;
 }
コード例 #5
0
ファイル: Series.cs プロジェクト: aihua/quant-lean
 /// <summary>
 /// Constructor method for Chart Series
 /// </summary>
 /// <param name="name">Name of the chart series</param>
 /// <param name="type">Type of the chart series</param>
 /// <param name="unit">Unit of the serier</param>
 /// <param name="color">Color of the series</param>
 /// <param name="symbol">Symbol for the marker in a scatter plot series</param>
 public Series(string name, SeriesType type, string unit, Color color, ScatterMarkerSymbol symbol = ScatterMarkerSymbol.None)
 {
     Name                = name;
     Values              = new List <ChartPoint>();
     SeriesType          = type;
     Unit                = unit;
     Index               = 0;
     Color               = color;
     ScatterMarkerSymbol = symbol;
 }
コード例 #6
0
ファイル: Series.cs プロジェクト: aihua/quant-lean
 /// <summary>
 /// Constructor method for Chart Series
 /// </summary>
 /// <param name="name">Name of the chart series</param>
 /// <param name="type">Type of the chart series</param>
 /// <param name="unit">Unit of the serier</param>
 public Series(string name, SeriesType type = SeriesType.Line, string unit = "$")
 {
     Name                = name;
     Values              = new List <ChartPoint>();
     SeriesType          = type;
     Unit                = unit;
     Index               = 0;
     Color               = Color.Empty;
     ScatterMarkerSymbol = ScatterMarkerSymbol.None;
 }
コード例 #7
0
ファイル: Chart.cs プロジェクト: Capnode/Algoloop
        /// <summary>
        /// Gets Series if already present in chart, else will add a new series and return it
        /// </summary>
        /// <param name="name">Name of the series</param>
        /// <param name="type">Type of the series</param>
        /// <param name="index">Index position on the chart of the series</param>
        /// <param name="unit">Unit for the series axis</param>
        /// <param name="color">Color of the series</param>
        /// <param name="symbol">Symbol for the marker in a scatter plot series</param>
        /// <param name="forceAddNew">True will always add a new Series instance, stepping on existing if any</param>
        public Series TryAddAndGetSeries(string name, SeriesType type, int index, string unit,
                                         Color color, ScatterMarkerSymbol symbol, bool forceAddNew = false)
        {
            Series series;

            if (forceAddNew || !Series.TryGetValue(name, out series))
            {
                series = new Series(name, type, index, unit)
                {
                    Color = color,
                    ScatterMarkerSymbol = symbol
                };
                Series[name] = series;
            }

            return(series);
        }
コード例 #8
0
        private static Geometry GetPointGeometry(ScatterMarkerSymbol symbol)
        {
            switch (symbol)
            {
            case ScatterMarkerSymbol.None:
                return(DefaultGeometries.Circle);

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

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

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

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

            default:
                return(DefaultGeometries.Circle);
            }
        }
コード例 #9
0
ファイル: Charting.cs プロジェクト: neosb/Lean
 /// <summary>
 /// Constructor method for Chart Series
 /// </summary>
 /// <param name="name">Name of the chart series</param>
 /// <param name="type">Type of the chart series</param>
 /// <param name="unit">Unit of the serier</param>
 /// <param name="color">Color of the series</param>
 /// <param name="symbol">Symbol for the marker in a scatter plot series</param>
 public Series(string name, SeriesType type, string unit, Color color, ScatterMarkerSymbol symbol = ScatterMarkerSymbol.Circle)
 {
     Name = name;
     Values = new List<ChartPoint>();
     SeriesType = type;
     Unit = unit;
     Index = 0;
     Color = color;
     ScatterMarkerSymbol = symbol;
 }
コード例 #10
0
ファイル: Charting.cs プロジェクト: neosb/Lean
 /// <summary>
 /// Constructor method for Chart Series
 /// </summary>
 /// <param name="name">Name of the chart series</param>
 /// <param name="type">Type of the chart series</param>
 /// <param name="unit">Unit of the serier</param>
 public Series(string name, SeriesType type = SeriesType.Line, string unit = "$")
 {
     Name = name;
     Values = new List<ChartPoint>();
     SeriesType = type;
     Unit = unit;
     Index = 0;
     Color = Color.Empty;
     ScatterMarkerSymbol = ScatterMarkerSymbol.Circle;
 }
コード例 #11
0
ファイル: Charting.cs プロジェクト: neosb/Lean
 /// <summary>
 /// Foundational constructor on the series class
 /// </summary>
 /// <param name="name">Name of the series</param>
 /// <param name="type">Type of the series</param>
 /// <param name="index">Index position on the chart of the series</param>
 /// <param name="unit">Unit for the series axis</param>
 public Series(string name, SeriesType type, int index, string unit)
 {
     Name = name;
     SeriesType = type;
     Index = index;
     Unit = unit;
     Color = Color.Empty;
     ScatterMarkerSymbol = ScatterMarkerSymbol.Circle;
 }
コード例 #12
0
ファイル: Charting.cs プロジェクト: neosb/Lean
 /// <summary>
 /// Foundational constructor on the series class
 /// </summary>
 /// <param name="name">Name of the series</param>
 /// <param name="type">Type of the series</param>
 public Series(string name, SeriesType type)
 {
     Name = name;
     SeriesType = type;
     Index = 0;
     Unit = "$";
     Color = Color.Empty;
     ScatterMarkerSymbol = ScatterMarkerSymbol.Circle;
 }
コード例 #13
0
ファイル: Charting.cs プロジェクト: neosb/Lean
 /// <summary>
 /// Constructor method for Chart Series
 /// </summary>
 /// <param name="name">Name of the chart series</param>
 public Series(string name)
 {
     Name = name;
     SeriesType = SeriesType.Line;
     Unit = "$";
     Index = 0;
     Color = Color.Empty;
     ScatterMarkerSymbol = ScatterMarkerSymbol.Circle;
 }
コード例 #14
0
ファイル: Charting.cs プロジェクト: AlexCatarino/Lean
 /// <summary>
 /// Foundational constructor on the series class
 /// </summary>
 /// <param name="name">Name of the series</param>
 /// <param name="type">Type of the series</param>
 /// <param name="index">Index position on the chart of the series</param>
 public Series(string name, SeriesType type, int index)
 {
     Name = name;
     SeriesType = type;
     Index = index;
     Unit = "$";
     Color = Color.Empty;
     ScatterMarkerSymbol = ScatterMarkerSymbol.None;
 }