Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
725
How to draw a rectangle (like when zooming) then get all the series items within the rectangle area
posted

I have a BubbleSeries. I would like to drag draw a rectangle then somehow know what series items were within the rectangle. I suppose it is hard, but the end user would like to select multiple "points" in the bubble chart by this way. A plus hardener we would like to keep the drag zoom functionality too. Say the zoom works with ctrl + drag, then this should work with shift + drag. 

Thanks in advance.

Parents
No Data
Reply
  • 30945
    Verified Answer
    Offline posted

    Hello Justin,

     

    Thank you for your post. I have been looking into the functionality that you wish to achieve and I have created a sample application for you, that shows an approach for implementing it. I have created a behavior, that allows you to draw a rectangle on top of the XamDataChart and get the points in that rectangle. The behavior has four properties:

     

    1. Series – the series from which the points should be get

    2. XAxis – the X Axis used for 1.

    3. YAXis – The Y Axis used for 1.

    4. SelectedPoints – it is from type ObservableCollection of objects, and when select a rectangle and release the mouse left button, this properties is set to the collection of items that are beneath the selected area. You can bind it to your view model.

     

    Since you wish to keep the default interaction with the XamDataChart, to use the selection you need to hold the Control key before start dragging.

     

    Please let me know if you need any further assistance on that matter.

     

    Sincerely,

    Krasimir, MCPD

    Developer Support Supervisor - XAML

    Infragistics

    www.infragistics.com/support

    RangeSelectionBubbleSeries.zip
Children