/// <summary>
        /// Transforms rectangle from viewport coordinates to data coordinates.
        /// </summary>
        /// <param name="viewportRect">Rectangle in viewport coordinates</param>
        /// <param name="transform">CoordinateTransform used to perform transformation</param>
        /// <returns>Rectangle in data coordinates</returns>
        public static Rect ViewportToData(this Rect viewportRect, DataTransform transform)
        {
            Point p1 = transform.ViewportToData(viewportRect.BottomLeft);
            Point p2 = transform.ViewportToData(viewportRect.TopRight);

            return(new Rect(p1, p2));
        }
        /// <summary>
        /// Transforms rectangle from viewport coordinates to data coordinates.
        /// </summary>
        /// <param name="viewportRect">Rectangle in viewport coordinates</param>
        /// <param name="transform">CoordinateTransform used to perform transformation</param>
        /// <returns>Rectangle in data coordinates</returns>
        public static DataRect ViewportToData(this DataRect viewportRect, DataTransform transform)
        {
            Point p1 = transform.ViewportToData(viewportRect.XMaxYMax);
            Point p2 = transform.ViewportToData(viewportRect.XMinYMin);

            return(new DataRect(p1, p2));
        }
		/// <summary>
		/// Transforms rectangle from viewport coordinates to data coordinates.
		/// </summary>
		/// <param name="viewportRect">Rectangle in viewport coordinates</param>
		/// <param name="transform">CoordinateTransform used to perform transformation</param>
		/// <returns>Rectangle in data coordinates</returns>
		public static Rect ViewportToData(this Rect viewportRect, DataTransform transform)
		{
			Point p1 = transform.ViewportToData(viewportRect.BottomLeft);
			Point p2 = transform.ViewportToData(viewportRect.TopRight);

			return new Rect(p1, p2);
		}
		/// <summary>
		/// Transforms rectangle from viewport coordinates to data coordinates.
		/// </summary>
		/// <param name="viewportRect">Rectangle in viewport coordinates</param>
		/// <param name="transform">CoordinateTransform used to perform transformation</param>
		/// <returns>Rectangle in data coordinates</returns>
		public static DataRect ViewportToData(this DataRect viewportRect, DataTransform transform)
		{
			Point p1 = transform.ViewportToData(viewportRect.XMaxYMax);
			Point p2 = transform.ViewportToData(viewportRect.XMinYMin);

			return new DataRect(p1, p2);
		}