GeoffW Posted April 11, 2010 Report Share Posted April 11, 2010 Hi, In my chart I am displaying multiple series of points as Scatter plots. I would like to Rubber Band a rectangle around a group of points and know which points exist in side the rectangle including which series they are associated with. Any ideas on how to do this would be greatly appreciated. Thanks Quote Link to comment Share on other sites More sharing options...
JuanC Posted April 11, 2010 Report Share Posted April 11, 2010 You can use our built-in selection code by executing this code on a button chart1.Selection.StartMouseSelection(new MouseSelectionHandler(OnEndSelection), null);private void OnEndSelection (object sender, MouseSelectionArgs args){ PointAttributes p = new PointAttributes(); p.Effects.Add(new ChartFX.WPF.DarkerEffect(30)); foreach (SeriesPoint seriesPoint in args.SelectedMarkers) { Debug.WriteLine(string.Format("Series: {0} Point {1} Y {2} X {3}", seriesPoint.Series.Content, seriesPoint.Point, seriesPoint.Value, seriesPoint.XValue)); chart1.Points[seriesPoint.SeriesIndex, seriesPoint.Point] = p; }} The last parameter in the StartMouseSelection method call allows to you change the template used to paint the selected region. JuanC Chart.zip Quote Link to comment Share on other sites More sharing options...
GeoffW Posted April 12, 2010 Author Report Share Posted April 12, 2010 Thanks JuanC for the prompt reply. I now have the functionality I required working. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.