Esempio n. 1
0
 /// <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;
 }
Esempio n. 2
0
 /// <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;
 }
Esempio n. 3
0
 /// <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;
 }
Esempio n. 4
0
 /// <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;
 }
Esempio n. 5
0
 /// <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;
 }
Esempio n. 6
0
 /// <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;
 }
Esempio n. 7
0
        /// <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);
        }
Esempio n. 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);
            }
        }
Esempio n. 9
0
 /// <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;
 }
Esempio n. 10
0
 /// <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;
 }
Esempio n. 11
0
 /// <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;
 }
Esempio n. 12
0
 /// <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;
 }
Esempio n. 13
0
 /// <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;
 }
Esempio n. 14
0
 /// <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;
 }