markmarkoh / datamaps

Customizable SVG map visualizations for the web in a single Javascript file using D3.js
http://datamaps.github.io
MIT License
3.78k stars 1.01k forks source link

Get tooltip to show while having custom mouseover event. #154

Closed maeishoj closed 9 years ago

maeishoj commented 9 years ago

Hey everyone,

first off, awesome job!

I was wondering if it's possible to manually invoke the tooltip when a "mouseover" event is called, because if I use something like this:

datamap.svg.selectAll('.datamaps-subunit').on('mouseover', function(geography) { $scope.tooltipInUse = $scope.currentContinent; highlightRegionOfCountry(geography.id.toLowerCase()); });

Then the tooltip gets disabled.

While I would still like to have it showing.

kieraneglin commented 8 years ago

Were you able to fix this issue? If so, how?

kieraneglin commented 8 years ago

For anyone in the future, if you use 'mouseenter' and 'mouseleave' instead, the tooltip shows up.