Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tooltip gets stuck after refresh data (updateWithOptions: true) #172

Closed
miguelrincon opened this issue Jul 9, 2015 · 6 comments
Closed

Comments

@miguelrincon
Copy link

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

tooltips

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.

@miguelrincon miguelrincon changed the title Tooltip get stuck after refresh data (updateWithOptions: true) Tooltip gets stuck after refresh data (updateWithOptions: true) Jul 9, 2015
@owaaa
Copy link

owaaa commented Aug 5, 2015

Having the same issue on discrete bar chart. Thanks for the workaround

@mikyladewitt
Copy link

I was also able to reproduce this issue using the donut chart.
The workaround also worked for me, though it would be nice if the tooltip could refresh with the new values.

I am using:
Angular v1.3.16
angular-nvd3 v1.0.0-rc2
nvd3 v1.8.1
d3 v3.5.6

@yppeaxy
Copy link

yppeaxy commented Sep 22, 2015

Yup, same here. I am seeing this on the pie chart.

@Glebby
Copy link

Glebby commented Oct 9, 2015

Same here. Is there a fix expected?

@sararaslivres
Copy link

Same here... also removing them by hacking it.

@krispo
Copy link
Owner

krispo commented Nov 28, 2015

@miguelrincon thanks, your approach is correct. In the latest releases [1.0.3+] all it's fixed.

@krispo krispo closed this as completed Nov 28, 2015
alanblins pushed a commit to alanblins/angular-nvd3 that referenced this issue Jan 31, 2017
Despite krispo#172 had been solved in case of changing data, bu it is stil happening when change options. Set the option useInteractiveGuideline true. After populate data, change  the current options like tickFormat. This only happens with useInteractiveGuideline=true.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants