I have an nvd3 pie chart. I am obtaining the percentage value as labels but I want it in the tooltip. Here is the HTML:
<nvd3-pie-chart data="Data1"id="labelTypePercentExample"
width="550"
height="350"
x="xFunction()"
y="yFunction()"
showLabels="true"
pieLabelsOutside="false"
tooltips="true"
tooltipcontent="toolTipContentFunction()"
labelType="percent"
showLegend="true">
</nvd3-pie-chart>
DATA
Data1=[{ key: "Ongoing", y: 20 },
{ key: "completed", y: 0 }];
Here is the tooltip function for showing key as tooltip-data.
$scope.toolTipContentFunction = function(){
return function(key, x, y, e, graph) {
return '<h1>' + key + '</h1>'
}
}