We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SfChart DragDelta value is always 0

Thread ID:





118235 Feb 13,2015 08:53 PM UTC Feb 17,2015 05:17 AM UTC WinRT 3
Tags: SfChart
Gary Montgomery
Asked On February 13, 2015 08:53 PM UTC

SFChart with a line series. Databound to an observable collection of custom objects. Editing enabled. Chart is fixed at 5 data points. First and last point edits are cancelled inside DragStart.

I would like to enforce a constraint that points must always increase in value from left to right. When increasing a point's value, if it equals the next point to the right, then both points should increase together in parallel.

I wired up the DragStart, DragDelta and DragEnd handlers. Inside the DragDelta I thought I would compare values and update adjacent points when needed.

The current issue is that e.Delta is always zero inside DragDelta according to my debugging.  

Is my expectation wrong or is there something special I need to do to get the delta change in the DragDelta handler?

Thank you,

Rachel A [Syncfusion]
Replied On February 16, 2015 12:42 PM UTC

Hi Gary,

Thank you for contacting Syncfusion support.

While dragging the segment, the delta value (e.Delta) in DragDelta event remains zero. We have considered this as an issue.

However this can be resolved by manually calculating the delta value, using the arguments BaseYValue and NewYValue in XYSegmentDragEventArgs (i.e., difference between base value and new value). We have prepared the sample based on your requirement and please download the sample in the below location.

Sample: Drag_Delta.zip

Also we request you to create an incident in direct trac support so that we could assist you in providing custom patch for the above mentioned issue.

Please let us know, if you need any further assistance on this.


Rachel. A

Gary Montgomery
Replied On February 16, 2015 11:48 PM UTC

Thank you Rachel! That did the trick.

Here is the relevant snippet for anyone that finds this post after the zip is removed.

        private void SplineSeries_DragDelta(object sender, DragDelta e)
            // get old and new y value
            double oldValue = (e as XySegmentDragEventArgs).BaseYValue;
            double newValue = (e as XySegmentDragEventArgs).NewYValue;

            double delta = 0;
            if (oldValue > newValue)
                delta = oldValue - newValue;
                delta = newValue - oldValue;

             // ....

Rachel A [Syncfusion]
Replied On February 17, 2015 05:17 AM UTC

Hi Gary,

Thanks for the update.

Please let us know if you require further assistance on this.




This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon