External/OxyPlot/OxyPlot/Series/HighLowItem.cs
changeset 391 5be8f2773237
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/External/OxyPlot/OxyPlot/Series/HighLowItem.cs	Sat Jun 08 16:53:22 2013 +0000
     1.3 @@ -0,0 +1,187 @@
     1.4 +// --------------------------------------------------------------------------------------------------------------------
     1.5 +// <copyright file="HighLowItem.cs" company="OxyPlot">
     1.6 +//   The MIT License (MIT)
     1.7 +//
     1.8 +//   Copyright (c) 2012 Oystein Bjorke
     1.9 +//
    1.10 +//   Permission is hereby granted, free of charge, to any person obtaining a
    1.11 +//   copy of this software and associated documentation files (the
    1.12 +//   "Software"), to deal in the Software without restriction, including
    1.13 +//   without limitation the rights to use, copy, modify, merge, publish,
    1.14 +//   distribute, sublicense, and/or sell copies of the Software, and to
    1.15 +//   permit persons to whom the Software is furnished to do so, subject to
    1.16 +//   the following conditions:
    1.17 +//
    1.18 +//   The above copyright notice and this permission notice shall be included
    1.19 +//   in all copies or substantial portions of the Software.
    1.20 +//
    1.21 +//   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
    1.22 +//   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    1.23 +//   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
    1.24 +//   IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
    1.25 +//   CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
    1.26 +//   TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
    1.27 +//   SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    1.28 +// </copyright>
    1.29 +// <summary>
    1.30 +//   Represents an item in a HighLowSeries.
    1.31 +// </summary>
    1.32 +// --------------------------------------------------------------------------------------------------------------------
    1.33 +namespace OxyPlot.Series
    1.34 +{
    1.35 +    /// <summary>
    1.36 +    /// Represents an item in a <see cref="HighLowSeries"/>.
    1.37 +    /// </summary>
    1.38 +    public class HighLowItem
    1.39 +    {
    1.40 +        /// <summary>
    1.41 +        /// The undefined.
    1.42 +        /// </summary>
    1.43 +        public static readonly HighLowItem Undefined = new HighLowItem(double.NaN, double.NaN, double.NaN);
    1.44 +
    1.45 +        /// <summary>
    1.46 +        /// The close.
    1.47 +        /// </summary>
    1.48 +        private double close;
    1.49 +
    1.50 +        /// <summary>
    1.51 +        /// The high.
    1.52 +        /// </summary>
    1.53 +        private double high;
    1.54 +
    1.55 +        /// <summary>
    1.56 +        /// The low.
    1.57 +        /// </summary>
    1.58 +        private double low;
    1.59 +
    1.60 +        /// <summary>
    1.61 +        /// The open.
    1.62 +        /// </summary>
    1.63 +        private double open;
    1.64 +
    1.65 +        /// <summary>
    1.66 +        /// The x.
    1.67 +        /// </summary>
    1.68 +        private double x;
    1.69 +
    1.70 +        /// <summary>
    1.71 +        /// Initializes a new instance of the <see cref="HighLowItem"/> class.
    1.72 +        /// </summary>
    1.73 +        public HighLowItem()
    1.74 +        {
    1.75 +        }
    1.76 +
    1.77 +        /// <summary>
    1.78 +        /// Initializes a new instance of the <see cref="HighLowItem"/> struct.
    1.79 +        /// </summary>
    1.80 +        /// <param name="x">
    1.81 +        /// The x value.
    1.82 +        /// </param>
    1.83 +        /// <param name="high">
    1.84 +        /// The high value.
    1.85 +        /// </param>
    1.86 +        /// <param name="low">
    1.87 +        /// The low value.
    1.88 +        /// </param>
    1.89 +        /// <param name="open">
    1.90 +        /// The open value.
    1.91 +        /// </param>
    1.92 +        /// <param name="close">
    1.93 +        /// The close value.
    1.94 +        /// </param>
    1.95 +        public HighLowItem(double x, double high, double low, double open = double.NaN, double close = double.NaN)
    1.96 +        {
    1.97 +            this.x = x;
    1.98 +            this.high = high;
    1.99 +            this.low = low;
   1.100 +            this.open = open;
   1.101 +            this.close = close;
   1.102 +        }
   1.103 +
   1.104 +        /// <summary>
   1.105 +        /// Gets or sets the close value.
   1.106 +        /// </summary>
   1.107 +        /// <value>The close value.</value>
   1.108 +        public double Close
   1.109 +        {
   1.110 +            get
   1.111 +            {
   1.112 +                return this.close;
   1.113 +            }
   1.114 +
   1.115 +            set
   1.116 +            {
   1.117 +                this.close = value;
   1.118 +            }
   1.119 +        }
   1.120 +
   1.121 +        /// <summary>
   1.122 +        /// Gets or sets the high value.
   1.123 +        /// </summary>
   1.124 +        /// <value>The high value.</value>
   1.125 +        public double High
   1.126 +        {
   1.127 +            get
   1.128 +            {
   1.129 +                return this.high;
   1.130 +            }
   1.131 +
   1.132 +            set
   1.133 +            {
   1.134 +                this.high = value;
   1.135 +            }
   1.136 +        }
   1.137 +
   1.138 +        /// <summary>
   1.139 +        /// Gets or sets the low value.
   1.140 +        /// </summary>
   1.141 +        /// <value>The low value.</value>
   1.142 +        public double Low
   1.143 +        {
   1.144 +            get
   1.145 +            {
   1.146 +                return this.low;
   1.147 +            }
   1.148 +
   1.149 +            set
   1.150 +            {
   1.151 +                this.low = value;
   1.152 +            }
   1.153 +        }
   1.154 +
   1.155 +        /// <summary>
   1.156 +        /// Gets or sets the open value.
   1.157 +        /// </summary>
   1.158 +        /// <value>The open value.</value>
   1.159 +        public double Open
   1.160 +        {
   1.161 +            get
   1.162 +            {
   1.163 +                return this.open;
   1.164 +            }
   1.165 +
   1.166 +            set
   1.167 +            {
   1.168 +                this.open = value;
   1.169 +            }
   1.170 +        }
   1.171 +
   1.172 +        /// <summary>
   1.173 +        /// Gets or sets the X value (time).
   1.174 +        /// </summary>
   1.175 +        /// <value>The X value.</value>
   1.176 +        public double X
   1.177 +        {
   1.178 +            get
   1.179 +            {
   1.180 +                return this.x;
   1.181 +            }
   1.182 +
   1.183 +            set
   1.184 +            {
   1.185 +                this.x = value;
   1.186 +            }
   1.187 +        }
   1.188 +
   1.189 +    }
   1.190 +}
   1.191 \ No newline at end of file