-
Notifications
You must be signed in to change notification settings - Fork 375
Description
I am updating to 1.0.0-rc.2 with nvd3 1.8.1 an I am experiencing some problems with the tooltips.
My pie chart is refreshed every 10 seconds with new data from an ajax call, if I happen to to hover the chart so a tooltip is shown WHILE the refresh happens, the tooltip stays stuck in the same position and is never removed from the DOM.
In my setup updateWithOptions
is true
Since nv.tooltip.cleanup
is removed from this version of nvd3, no cleanup happens on clearElement.
I am able to make things work normally by forcibly removing the tooltip in the clearElement function like this:
// Fully clear directive element
clearElement: function (){
/* ... */
if (scope.chart && scope.chart.tooltip){
d3.select("#" + scope.chart.tooltip.id()).remove();
}
/* ... */
scope.chart = null;
},
Not sure if this is the right approach and also I hope not to have to hack this tool.
I am using angular v1.4.2 and I was not able to reproduce this issue on a lineChart.