External/OxyPlot/OxyPlot/Series/HighLowItem.cs
author Stephane Lenclud
Sat, 30 Jan 2016 23:01:51 +0100
branchMiniDisplay
changeset 454 f84878f52cd9
permissions -rw-r--r--
Disabling Nuvoton NCT6791D because of fan full speed bug on Asus Z97 WS.
     1 // --------------------------------------------------------------------------------------------------------------------
     2 // <copyright file="HighLowItem.cs" company="OxyPlot">
     3 //   The MIT License (MIT)
     4 //
     5 //   Copyright (c) 2012 Oystein Bjorke
     6 //
     7 //   Permission is hereby granted, free of charge, to any person obtaining a
     8 //   copy of this software and associated documentation files (the
     9 //   "Software"), to deal in the Software without restriction, including
    10 //   without limitation the rights to use, copy, modify, merge, publish,
    11 //   distribute, sublicense, and/or sell copies of the Software, and to
    12 //   permit persons to whom the Software is furnished to do so, subject to
    13 //   the following conditions:
    14 //
    15 //   The above copyright notice and this permission notice shall be included
    16 //   in all copies or substantial portions of the Software.
    17 //
    18 //   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
    19 //   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    20 //   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
    21 //   IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
    22 //   CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
    23 //   TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
    24 //   SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    25 // </copyright>
    26 // <summary>
    27 //   Represents an item in a HighLowSeries.
    28 // </summary>
    29 // --------------------------------------------------------------------------------------------------------------------
    30 namespace OxyPlot.Series
    31 {
    32     /// <summary>
    33     /// Represents an item in a <see cref="HighLowSeries"/>.
    34     /// </summary>
    35     public class HighLowItem
    36     {
    37         /// <summary>
    38         /// The undefined.
    39         /// </summary>
    40         public static readonly HighLowItem Undefined = new HighLowItem(double.NaN, double.NaN, double.NaN);
    41 
    42         /// <summary>
    43         /// The close.
    44         /// </summary>
    45         private double close;
    46 
    47         /// <summary>
    48         /// The high.
    49         /// </summary>
    50         private double high;
    51 
    52         /// <summary>
    53         /// The low.
    54         /// </summary>
    55         private double low;
    56 
    57         /// <summary>
    58         /// The open.
    59         /// </summary>
    60         private double open;
    61 
    62         /// <summary>
    63         /// The x.
    64         /// </summary>
    65         private double x;
    66 
    67         /// <summary>
    68         /// Initializes a new instance of the <see cref="HighLowItem"/> class.
    69         /// </summary>
    70         public HighLowItem()
    71         {
    72         }
    73 
    74         /// <summary>
    75         /// Initializes a new instance of the <see cref="HighLowItem"/> struct.
    76         /// </summary>
    77         /// <param name="x">
    78         /// The x value.
    79         /// </param>
    80         /// <param name="high">
    81         /// The high value.
    82         /// </param>
    83         /// <param name="low">
    84         /// The low value.
    85         /// </param>
    86         /// <param name="open">
    87         /// The open value.
    88         /// </param>
    89         /// <param name="close">
    90         /// The close value.
    91         /// </param>
    92         public HighLowItem(double x, double high, double low, double open = double.NaN, double close = double.NaN)
    93         {
    94             this.x = x;
    95             this.high = high;
    96             this.low = low;
    97             this.open = open;
    98             this.close = close;
    99         }
   100 
   101         /// <summary>
   102         /// Gets or sets the close value.
   103         /// </summary>
   104         /// <value>The close value.</value>
   105         public double Close
   106         {
   107             get
   108             {
   109                 return this.close;
   110             }
   111 
   112             set
   113             {
   114                 this.close = value;
   115             }
   116         }
   117 
   118         /// <summary>
   119         /// Gets or sets the high value.
   120         /// </summary>
   121         /// <value>The high value.</value>
   122         public double High
   123         {
   124             get
   125             {
   126                 return this.high;
   127             }
   128 
   129             set
   130             {
   131                 this.high = value;
   132             }
   133         }
   134 
   135         /// <summary>
   136         /// Gets or sets the low value.
   137         /// </summary>
   138         /// <value>The low value.</value>
   139         public double Low
   140         {
   141             get
   142             {
   143                 return this.low;
   144             }
   145 
   146             set
   147             {
   148                 this.low = value;
   149             }
   150         }
   151 
   152         /// <summary>
   153         /// Gets or sets the open value.
   154         /// </summary>
   155         /// <value>The open value.</value>
   156         public double Open
   157         {
   158             get
   159             {
   160                 return this.open;
   161             }
   162 
   163             set
   164             {
   165                 this.open = value;
   166             }
   167         }
   168 
   169         /// <summary>
   170         /// Gets or sets the X value (time).
   171         /// </summary>
   172         /// <value>The X value.</value>
   173         public double X
   174         {
   175             get
   176             {
   177                 return this.x;
   178             }
   179 
   180             set
   181             {
   182                 this.x = value;
   183             }
   184         }
   185 
   186     }
   187 }