You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Filter down the currently drawn points, such that all points that are not included in the filter are visually and interactivelly hidden. This will trigger a `filter` event unless `options.preventEvent === true`.
396
+
397
+
Note: filtering down points can affect previously selected points. Selected points that are filtered out are also deselected.
398
+
399
+
**Arguments:**
400
+
401
+
-`points` is an array of indices referencing the points that you want to filter down to.
402
+
-`options`[optional] is an object with the following properties:
403
+
-`preventEvent`: if `true` the `select` will not be published.
404
+
405
+
**Examples:**
406
+
407
+
```javascript
408
+
// Let's say we have three points
409
+
scatterplot.draw([
410
+
[0.1, 0.1],
411
+
[0.2, 0.2],
412
+
[0.3, 0.3],
413
+
]);
414
+
415
+
// To only show the first and second point we have to do
Programmatically hover a point, such that it gets visually highlighted. This will trigger a `pointover` or `pointout` event unless `options.preventEvent === true`.
@@ -844,6 +874,8 @@ Render Regl draw instructions into a target canvas using the renderer.
844
874
| pointOut | when the mouse cursor moves out of a point | pointIndex |
845
875
| select | when points are selected |`{ points }`|
846
876
| deselect | when points are deselected |`undefined`|
877
+
| filter | when points are filtered |`{ points }`|
878
+
| unfilter | when the point filter is reset |`undefined`|
847
879
| view | when the view has changes |`{ camera, view, xScale, yScale }`|
848
880
| draw | when the plot was drawn |`{ camera, view, xScale, yScale }`|
849
881
| lassoStart | when the lasso selection has started |`undefined`|
0 commit comments