/usr/share/doc/libjs-d3-tip/showing-and-hiding-tooltips.md is in libjs-d3-tip 0.7.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | [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)
})
```
|