Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
gibran-shah
Contributor
Contributor

How can I cycle through my data points to see which ones are selected by my lasso?

Hello,

I have a lasso example on a picasso.js scatter plot at this JSFiddle: https://jsfiddle.net/3sbvwpxa/. You can try it out by drawing a lasso around any set of points you want.

Once the lasso is complete (user releases mouse button), I need to be go through all the data points and figure out which ones are in the lasso. This means I need to:

1) iterate through each data point.

2) run each point through a function/algorithm that figures out if its inside the lasso or not.

I need help with both of these. How do I get access to my data points? And does anyone know a good algorithm for determining if points are within a lasso region?

Thanks!

Labels (1)
0 Replies