Hi All,
Hope someone can help me. I've got a XamDataChart with multiple scatter line series lines. I want to select a certain datapoint on a series and move that point to the users selected position on the chart with my mouse. Is this possible?
Ive got this code so far to give me my mouse position when the user clicks(Mouse down event):
var x = Chart.Axes.OfType<NumericXAxis>().First(); var y = Chart.Axes.OfType<NumericYAxis>().First(); var viewport = new Rect(0, 0, x.ActualWidth, y.ActualHeight); var window = gearShiftProfileChart.WindowRect;
var position = e.GetPosition(Chart);
var unscaledX = x.GetUnscaledValue(position.X, window, viewport); var unscaledY = y.GetUnscaledValue(position.Y, window, viewport);
System.Windows.MessageBox.Show("x: " + unscaledX + ", y:" + unscaledY);
Friendly regards
Roelof
Hello Roelof,
Yes, I was just about to suggest it! You can also subtract .30 at the very end of the GetUnscaledValue method.
Glad you were able to address it. Have a nice day.
Hi Michael,
Resolved this issue by adjusting this line(Added -30 to the p.X value)
this.DraggingWidget.ValueX = this.xChart.Axes.OfType<NumericXAxis>().First().GetUnscaledValue(p.X - 30, this.xChart.WindowRect, this.xChart.ViewportRect);
Friendly Regards,
The point still jumps to the right hand side of the cursor as soon as I move my mouse. Not end of the world...
Thanks for the help
Regards,
Please see attached below, and clarify whether or not you experience any issues. Please keep in mind that dragging data points is considered to be a new product idea.
You can suggest new product ideas for future versions by emailing ideas@infragistics.com.
Submitting your idea will send it directly to our product management team so that it can be imported into our new ideas community once live: http://ideas.infragistics.com
Remember when submitting your idea to explain the context in which a feature would be used and why it is needed as well as anything that would prevent you from accomplishing this today. You can even add screenshots to build a stronger case. You can also link back to this thread for additional details.Thank you in advance to submitting your product idea.
With this one I am struggling. I've added the ranges but it still jumps.
Could you please attach an example?