Skip to content

Commit d72fa3d

Browse files
committed
Document hover()
1 parent 48b13cd commit d72fa3d

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,29 @@ scatterplot.select([0, 1]);
288288

289289
Deselect all selected points. This will trigger a `deselect` event unless `options.preventEvent === true`.
290290

291+
<a name="scatterplot.hover" href="#scatterplot.hover">#</a> scatterplot.<b>hover</b>(<i>point</i>, <i>options = {}</i>)
292+
293+
Programmatically hover a point, such that it gets visually highlighted. This will trigger a `pointover` or `pointout` event unless `options.preventEvent === true`.
294+
295+
**Arguments:**
296+
297+
- `points` is an array of point indices.
298+
- `options` [optional] is an object with the following properties:
299+
- `showReticleOnce`: if `true` the reticle will be shown once, even if `showReticle === false`.
300+
- `preventEvent`: if `true` the `pointover` and `pointout` will not be published.
301+
302+
**Examples:**
303+
304+
```javascript
305+
scatterplot.draw([
306+
[0.1, 0.1],
307+
[0.2, 0.2],
308+
[0.3, 0.3],
309+
]);
310+
311+
scatterplot.hover(1); // To hover the second point
312+
```
313+
291314
**Arguments:**
292315

293316
- `options` [optional] is an object with the following properties:

0 commit comments

Comments
 (0)