예제 #1
0
        private static void behavior_PositionChanging(object sender, TrackBallPositionChangingEventArgs e)
        {
            ChartTrackBallBehavior behav = (ChartTrackBallBehavior)sender;
            Point pos = new Point(e.NewPosition.X - behav.Chart.PanOffset.X, e.NewPosition.Y - behav.Chart.PanOffset.Y);

            if (!behav.Chart.PlotAreaClip.Contains(pos.X, pos.Y))
            {
                e.NewPosition = e.PreviousPosition;
            }
        }
예제 #2
0
 private static void behavior_PositionChanging(object sender, TrackBallPositionChangingEventArgs e)
 {
     ChartTrackBallBehavior behav = (ChartTrackBallBehavior)sender;
     Point pos = new Point(e.NewPosition.X - behav.Chart.PanOffset.X, e.NewPosition.Y - behav.Chart.PanOffset.Y);
     if (!behav.Chart.PlotAreaClip.Contains(pos.X, pos.Y))
     {
         e.NewPosition = e.PreviousPosition;
     }
 }