You can manually show the tooltip by doing the following:
nv.tooltip.show([200, 400], '<p>Your content goes here</p>');
Then, to hide the tooltip:
nv.tooltip.cleanup();
I just found out how to do this by doing a code search. I could not find the documentation.
Here is an extended example of a situation I needed to solve (showing a tooltip on a legend label using jQuery):
$("#chart svg .nv-series .nv-legend-text").each(function(i, elem) {
$(elem).hover(function() {
var offset = $(this).offset();
nv.tooltip.show([offset.left, offset.top], '<p>' + data[i].longLabel + '</p>');
}, function() {
nv.tooltip.cleanup();
});
});
To solve your situation, you can probably do something similar, with the exception of selecting individual bar elements.
source
share