コード例 #1
0
ファイル: LineUtils.cs プロジェクト: iProcyonidae/MVS
 /// <summary>
 /// Get the absolute location of dp 
 /// </summary>
 /// <param name="cg">for finding the absolute location</param>
 /// <param name="dp"></param>
 /// <returns></returns>
 public static PointF GetAbsolutePoint(ChartGraphics cg, DataPoint dp)
 {
     PointF p1 = new PointF(
     (float)cg.GetPositionFromAxis("Default", AxisName.X, dp.XValue),
     (float)cg.GetPositionFromAxis("Default", AxisName.Y, dp.YValues[0]));
     p1 = cg.GetAbsolutePoint(p1);
     return p1;
 }
コード例 #2
0
        /// <summary>
        /// </summary>
        /// <param name="cg"></param>
        /// <param name="x"></param>
        /// <param name="y"></param>
        /// <returns></returns>
        private PointF ToPixelsPos(ChartGraphics cg, double x, double y)
        {
            var p = new PointF((float) cg.GetPositionFromAxis(kChartAreaName, AxisName.X, x),
                (float) cg.GetPositionFromAxis(kChartAreaName, AxisName.Y, y));


            return cg.GetAbsolutePoint(p);
        }