Exemplo n.º 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));
        }
Exemplo n.º 2
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 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);
        }
Exemplo n.º 3
0
 /// <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)));
 }
Exemplo n.º 4
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 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;
        }
Exemplo n.º 5
0
 /// <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));
 }