js/css duo for bootstrap style tooltips.
Click a gisted example.
Tooltip.js attaches event listeners to selections that go and display bootstrap tooltips.
An example of how to use it:
selection.tooltip(function(d,i){
return {
'placement': 'top' //Or left, right, or bottom
'dy': i*10 //It's a function!
'dx': i*Math.PI
};
})
Viola! Tooltips!
- Add in better defaults
- Get the animations going
- Make it do popovers.
- Write some tests.
- Use it in an actual popover.
Public domain.