I have am using piechart by nvd3. Lately I upgraded nvd3 to 1.8.1 and I need to overwrite tooltip. This is my code from older version:
piechartCurrent.tooltip.contentGenerator(function (obj) {
content = '<h3 style="background-color: ';
content += obj.color + '">';
content += obj.data.key + '</h3><p>$' + Math.round(obj.data.y * 100) / 100 + ' ('+ obj.data.symbols +')</p>';
return content;
});
Which looks like this:
But I would like to use new style for tooltip:
What is html code for new tooltip? I need to overwrite tooltip, since I need some custom text there.
Edit:
Jsfiddle example
Edit 2: Jsfiddle with symbols.