Tooltips

Learn about tooltips, transitions, and the various types of events in D3.

We'll cover the following

What are tooltips?

Tooltips have a marvelous duality. On one hand, they are a pretty darned useful thing that aids in giving context and information where required. And on the other hand, if done with a bit of care, they can look very stylish.

Technically, they represent a slight deviation into a mildly more complex arena of “transitions” and “events.” You will probably regard this one of two ways; either accept that it just works and use it as shown or you could actually try to know what’s going on. In which case, feel free to deride my efforts as those of a rank amateur.

Just in case there is some confusion, a tooltip is a discrete piece of information that will pop into view when the mouse hovers over somewhere specific. Most of us have seen and used them, but I suppose we all tend to call them different things such as, “infotip,” “hint.” or “hover box.” I don’t know if there’s a right name for them, but here’s an example of what we’re trying to achieve:

Get hands-on with 1200+ tech skills courses.