t-viSNE: Interactive Assessment and Interpretation of t-SNE Projections
https://doi.org/10.1109/TVCG.2020.2986996
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
747 B
41 lines
747 B
6 years ago
|
[API Documentation](index.md) ➤ Showing and hiding tooltips
|
||
|
|
||
|
# Showing and hiding tooltips
|
||
|
|
||
|
### tip.show
|
||
|
Show a tooltip on the screen.
|
||
|
|
||
|
``` javascript
|
||
|
rect.on('mouseover', tip.show)
|
||
|
```
|
||
|
|
||
|
``` javascript
|
||
|
rect.on('mouseover', function(d) {
|
||
|
tip.show(d)
|
||
|
})
|
||
|
```
|
||
|
|
||
|
#### Explicit targets
|
||
|
Sometimes you need to manually specify a target to act on. For instance, maybe
|
||
|
you want the tooltip to appear over a different element than the one that triggered
|
||
|
a `mouseover` event. You can specify an explicit target by passing an `SVGElement`
|
||
|
as the last argument.
|
||
|
|
||
|
``` javascript
|
||
|
tip.show(data, target)
|
||
|
```
|
||
|
|
||
|
|
||
|
### tip.hide
|
||
|
Hide a tooltip
|
||
|
|
||
|
``` javascript
|
||
|
rect.on('mouseout', tip.hide)
|
||
|
```
|
||
|
|
||
|
``` javascript
|
||
|
rect.on('mouseout', function(d) {
|
||
|
tip.hide(d)
|
||
|
})
|
||
|
```
|