All examples By author By category About

rpgove

Showing tooltips above a different element with d3-tip

Sometimes you need to show a tooltip over a different element than the one firing the mouseover event. Fortunately, d3-tip allows you to do that by passing an SVGElement as the second parameter to tip.show(). Like this:

tip.show(data, target)

This SVGElement will be the new target of the tooltip.