LiveCharts.Charts.ChartCore.Drag C# (CSharp) Method

Drag() public method

Drags the specified delta.
public Drag ( CorePoint delta ) : void
delta LiveCharts.Dtos.CorePoint The delta.
return void
        public void Drag(CorePoint delta)
        {
            if (View.Zoom == ZoomingOptions.None) return;

            if (View.Zoom == ZoomingOptions.X || View.Zoom == ZoomingOptions.Xy)
            {
                foreach (var xi in AxisX)
                {
                    xi.View.SetRange((double.IsNaN(xi.MinValue) ? xi.BotLimit : xi.MinValue) + delta.X,
                        (double.IsNaN(xi.MaxValue) ? xi.TopLimit : xi.MaxValue) + delta.X);
                }
            }

            if (View.Zoom == ZoomingOptions.Y || View.Zoom == ZoomingOptions.Xy)
            {
                foreach (var yi in AxisY)
                {
                    yi.View.SetRange((double.IsNaN(yi.MinValue) ? yi.BotLimit : yi.MinValue) + delta.Y,
                        (double.IsNaN(yi.MaxValue) ? yi.TopLimit : yi.MaxValue) + delta.Y);
                }
            }
        }