コード例 #1
0
        /// <summary>
        /// Gets the screen rectangle for the box.
        /// </summary>
        /// <param name="item">The box item.</param>
        /// <returns>A rectangle.</returns>
        private OxyRect GetBoxRect(BoxPlotItem item)
        {
            var halfBoxWidth = this.BoxWidth * 0.5;

            var p1 = this.Transform(item.X - halfBoxWidth, item.BoxTop);
            var p2 = this.Transform(item.X + halfBoxWidth, item.BoxBottom);

            return(new OxyRect(p1, p2));
        }
コード例 #2
0
ファイル: BoxPlotSeries.cs プロジェクト: hcoona/OneDotNet
        /// <summary>
        /// Gets the screen rectangle for the box.
        /// </summary>
        /// <param name="item">The box item.</param>
        /// <returns>A rectangle.</returns>
        private OxyRect GetBoxRect(BoxPlotItem item)
        {
            var halfBoxWidth = this.BoxWidth * 0.5;

            var boxTop    = this.Transform(item.X - halfBoxWidth, item.BoxTop);
            var boxBottom = this.Transform(item.X + halfBoxWidth, item.BoxBottom);

            var rect = new OxyRect(boxTop.X, boxTop.Y, boxBottom.X - boxTop.X, boxBottom.Y - boxTop.Y);

            return(rect);
        }
コード例 #3
0
ファイル: BoxPlotSeries.cs プロジェクト: hcoona/OneDotNet
 /// <summary>
 /// Determines whether the specified item contains a valid point.
 /// </summary>
 /// <param name="item">The item.</param>
 /// <param name="xaxis">The x axis.</param>
 /// <param name="yaxis">The y axis.</param>
 /// <returns><c>true</c> if the point is valid; otherwise, <c>false</c> .</returns>
 public virtual bool IsValidPoint(BoxPlotItem item, Axis xaxis, Axis yaxis)
 {
     return(!double.IsNaN(item.X) && !double.IsInfinity(item.X) && !item.Values.Any(double.IsNaN) &&
            !item.Values.Any(double.IsInfinity) && (xaxis != null && xaxis.IsValidValue(item.X)) &&
            (yaxis != null && item.Values.All(yaxis.IsValidValue)));
 }
コード例 #4
0
ファイル: BoxPlotSeries.cs プロジェクト: Cheesebaron/oxyplot
        /// <summary>
        /// Gets the screen rectangle for the box.
        /// </summary>
        /// <param name="item">The box item.</param>
        /// <returns>A rectangle.</returns>
        private OxyRect GetBoxRect(BoxPlotItem item)
        {
            var halfBoxWidth = this.BoxWidth * 0.5;

            var boxTop = this.Transform(item.X - halfBoxWidth, item.BoxTop);
            var boxBottom = this.Transform(item.X + halfBoxWidth, item.BoxBottom);

            var rect = new OxyRect(boxTop.X, boxTop.Y, boxBottom.X - boxTop.X, boxBottom.Y - boxTop.Y);
            return rect;
        }
コード例 #5
0
ファイル: BoxPlotSeries.cs プロジェクト: Cheesebaron/oxyplot
 /// <summary>
 /// Determines whether the specified item contains a valid point.
 /// </summary>
 /// <param name="item">The item.</param>
 /// <param name="xaxis">The x axis.</param>
 /// <param name="yaxis">The y axis.</param>
 /// <returns><c>true</c> if the point is valid; otherwise, <c>false</c> .</returns>
 public virtual bool IsValidPoint(BoxPlotItem item, Axis xaxis, Axis yaxis)
 {
     return !double.IsNaN(item.X) && !double.IsInfinity(item.X) && !item.Values.Any(double.IsNaN)
            && !item.Values.Any(double.IsInfinity) && (xaxis != null && xaxis.IsValidValue(item.X))
            && (yaxis != null && item.Values.All(yaxis.IsValidValue));
 }