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
- 📈 Real-time counter showing number of selected points
11
+
- 🎮 **Controlled selection** – programmatically set selection from props
12
+
- 🔄 Bidirectional data flow – selection updates flow both ways
11
13
12
14
## Tech Stack
13
15
@@ -27,10 +29,25 @@ Open your browser and navigate to the local dev server (typically `http://localh
27
29
28
30
## Usage
29
31
32
+
### Interactive Selection
33
+
30
34
-**Drag** within the chart area to create a rectangular selection
31
35
-**Selected points** remain fully visible; non-selected points are dimmed
32
36
- The **"Selected: N"** counter updates in real-time
33
37
-**Click outside** the selection or brush over empty area to clear
38
+
-**Press Escape** to clear the selection
39
+
40
+
### Controlled Selection (New!)
41
+
42
+
The ScatterPlot component now supports controlled selection, allowing you to programmatically set the selection from your code. See [CONTROLLED_SELECTION.md](./CONTROLLED_SELECTION.md) for detailed documentation.
43
+
44
+
```tsx
45
+
<ScatterPlot
46
+
data={myData}
47
+
selection={selection}// Control selection via prop
0 commit comments