コード例 #1
0
ファイル: CandlePlot.cs プロジェクト: drmason789/nplot
            /// <summary>
            /// Returns a y-axis that is suitable for drawing the data.
            /// </summary>
            /// <returns>A suitable y-axis.</returns>
            public Axis SuggestYAxis()
            {
                double min_l;
                double max_l;
                double min_h;
                double max_h;

                if (rows_ == null)
                {
                    Utils.ArrayMinMax((IList)lowData_, out min_l, out max_l);
                    Utils.ArrayMinMax((IList)highData_, out min_h, out max_h);
                }
                else
                {
                    Utils.RowArrayMinMax(rows_, out min_l, out max_l, (string)lowData_);
                    Utils.RowArrayMinMax(rows_, out min_h, out max_h, (string)highData_);
                }

                Axis a = new LinearAxis(min_l, max_h);

                a.IncreaseRange(0.08);
                return(a);
            }