Profile Picture

Points drag in wireframe surface

Posted By Alex Vorobey 14 Years Ago
Author
Message
Alex Vorobey
Posted 14 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: Forum Members
Last Active: 14 Years Ago
Posts: 4, Visits: 1
Please help me to find answer:
1. Is it possible to interactively drag points in the wireframe grid surface like it possible in the 2D chart ("Interactivity\Tools\Data Point Drag Tools" C# example) ?
2. How to use NDataPointDragTool to detect which marker from the which series are moved and new position of it? The help and example doesn't describe this.

I'm use trial Nevron .NET Vision 2010.1 for VS2005


Milen Metodiev
Posted 14 Years Ago
View Quick Profile
Forum Member

Forum Member (48 reputation)Forum Member (48 reputation)Forum Member (48 reputation)Forum Member (48 reputation)Forum Member (48 reputation)Forum Member (48 reputation)Forum Member (48 reputation)Forum Member (48 reputation)Forum Member (48 reputation)

Group: Nevron Team
Last Active: 14 Years Ago
Posts: 48, Visits: 1

Hi Alex,

Regarding your questions:

1. Currently the surface charts do not support data point dragging.

2. You can subscribe for the EndDrag event of the NDataPointDragTool class and in the event handler you can check the nChartControl1.Controller.Selection.SelectedObjects collection to find out which object has just been dragged.

Best Regards,
Milen



Alex Vorobey
Posted 14 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: Forum Members
Last Active: 14 Years Ago
Posts: 4, Visits: 1
Thanks for response, Milen!

The result code is:

void EndDragEventHandler(object sender, System.EventArgs e)
{
  if (nChartControl1.Controller.Selection.SelectedObjects.Count == 1)
  {
    NDataPoint point = (NDataPoint)nChartControl1.Controller.Selection.SelectedObjects[0];
    Debug.WriteLine(String.Format("X:{0} Y:{1}", point[DataPointValue.X], point[DataPointValue.Y]));
  }
}


Alex Vorobey
Posted 14 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: Forum Members
Last Active: 14 Years Ago
Posts: 4, Visits: 1
One more question:

In the EndDrag event of the NDataPointDragTool class I got previous coordinates of the marker - that was before drag. Is it possible to get current marker coordinates and change it if requires, for example determine that the value did not exceed the maximum?


Nevron Support
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009
Hi Alex,

The values are already updated in the series when the EndDrag event is fired, but the data point object keeps the old values. You can read the new ones directly from the series or compose a data point object like this:


NSeries series = (NSeries)point.ParentNode;
NDataPoint newDP = series.ComposeDataPoint(point.IndexInSeries);
MessageBox.Show(String.Format("X:{0} Y:{1}", newDP[DataPointValue.X], newDP[DataPointValue.Y]));



Best Regards,
Nevron Support Team



Alex Vorobey
Posted 14 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: Forum Members
Last Active: 14 Years Ago
Posts: 4, Visits: 1
Thanks, works perfect



Similar Topics


Reading This Topic