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 still getting stuck #615

Open
alanblins opened this issue Jan 31, 2017 · 6 comments
Open

Tooltip still getting stuck #615

alanblins opened this issue Jan 31, 2017 · 6 comments

Comments

@alanblins
Copy link

Despite #172 had been solved in case of changing data, this bug is still happening when it changes the options. Set the option useInteractiveGuideline=true. After populating data, change the current options such as tickFormat. This only happens with useInteractiveGuideline=true.
The cause of the problem is because clearElement is removing the wrong id tooltip.

if (scope.chart && scope.chart.tooltip && scope.chart.tooltip.id) {
                                d3.select('#' + scope.chart.tooltip.id()).remove();
                            }

I think to solve this in case of useInteractiveGuideline=true should have this complement, right?

 if (scope.chart && scope.chart.interactiveLayer && scope.chart.interactiveLayer.tooltip && scope.chart.interactiveLayer.tooltip.id) { 
                                d3.select('#' + scope.chart.interactiveLayer.tooltip.id()).remove(); 
                            } 
@RyanChristian259
Copy link

RyanChristian259 commented Feb 13, 2017

Thanks @alanblins! I am having the same problem and this code solved it. Is there a different way to solve the problem? If not then I'd love to see this merged.

@anx-ckreuzberger
Copy link

PR #616 fixes this issue for me!
Thanks a lot.

@alanblins
Copy link
Author

Hi @RyanChristian259, I don't know a different way to solve it.

@RyanChristian259
Copy link

@alanblins I ended up using your code through a decorator class in order to inject it into the Angular-NVD3 library. Thank you very much for the fix. Hopefully your solution will get merged at some point.

@Shubhamnandwana18
Copy link

Hi @alanblins @RyanChristian259
Problem stills persist when I move the mouse over chart consistently. Tooltip stucks while the chart refreshes.
Still stuck with this problem.
Thanks

@mdvali6666
Copy link

This trick helps for me:
chart: {
callback: function(chart) {
$timeout(function() {
d3.selectAll('.nvtooltip').style('opacity', 0);
}, 100);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants