Example #1
0
        private int mouseMoveCount      = 0; //See sysSensibilityPAN

        /// <summary>
        /// Get Y-Viewport(min,max) of all curves in the current X-Vieport defined by [myViewportX].
        /// The function used Y-Axis data stored in [mySeriesY]
        /// </summary>
        /// <returns></returns>
        private ValueRange GetViewportY()
        {
            ValueRange range = new ValueRange();

            for (int idx = 0; idx < this.myGraphPane.CurveList.Count; idx++)
            {
                Libs.GetRangeY(this.myGraphPane.CurveList[idx], this.myViewportX.Min, this.myViewportX.Max, ref range);
            }
            range.Max += Settings.sysViewSpaceAtTOP;
            range.Min -= Settings.sysViewSpaceAtBOT;
            return(range);
        }
Example #2
0
        private int mouseMoveCount      = 0; //See sysSensibilityPAN

        /// <summary>
        /// Get Y-Viewport(min,max) of all curves in the current X-Vieport defined by [myViewportX].
        /// The function used Y-Axis data stored in [mySeriesY]
        /// </summary>
        /// <returns></returns>
        private ValueRange GetViewportY()
        {
            ValueRange range = new ValueRange();

            for (int idx = 0; idx < this.myGraphPane.CurveList.Count; idx++)
            {
                Libs.GetRangeY(this.myGraphPane.CurveList[idx], this.myViewportX.Min, this.myViewportX.Max, ref range);
            }
            if (this.myGraphPane.CurveList.Count > 0)
            {
                decimal diff = (decimal)(range.Max - range.Min);
                range.Max += (double)(diff * Settings.sysViewSpaceAtTOP / 100);
                range.Min -= (double)(diff * Settings.sysViewSpaceAtBOT / 100);
            }
            return(range);
        }