Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Custom tooltip for nvd3
// custom tooltip example
chart.tooltip.contentGenerator(function (obj) {
var format = d3.format(",d");
return '<table><thead><tr><td class=x-value colspan=3><h1 class=tooltip>' + + '</h1></td></tr></thead>' +
'<tbody><tr><td class=key>Impact Factor:</td><td class=value>' + + '</td></tr>' +
'<tr><td class=key>Citations:</td><td class=value>' + format( + '</td></tr>' +
'<tr><td class=key>Funding:</td><td class=value>$' + format( + '</td></tr>' +

This comment has been minimized.

Copy link
Owner Author

@Kyeongan Kyeongan commented Jun 28, 2016

an example of custom tooltip
screen shot 2016-06-28 at 11 16 14 am


This comment has been minimized.

Copy link

@nhdong1505 nhdong1505 commented Mar 21, 2019


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.