datamaps icon indicating copy to clipboard operation
datamaps copied to clipboard

Tooltip blink on mouseover

Open naveenkumar87 opened this issue 7 years ago • 4 comments

If i move the mouse on the area of country, tooltip continuously blinks and it changes country color.

world_map

naveenkumar87 avatar Aug 06 '17 10:08 naveenkumar87

Adding done: function() {}, to the configuration worked for me.

lukaskupczyk avatar Aug 07 '17 21:08 lukaskupczyk

I added done parameter, no luck. This is my config:

                               var basic = new Datamap({
 	 					element: document.getElementById('world-map'),
 	 					fills:{
 	 						shipment: 'blue',
 	 						defaultFill: '#ABDDA4'
 	 					},
 	 					done: function(){
 	 						console.log('done');
 	 					},
 	 					geographyConfig: {
 	 			                    popupTemplate: function(geo, data) {
 	 			            	     if(data){
 	 			            		return ['<div class="hoverinfo">',
 	 	 			                        '' + geo.properties.name,
 	 	 			                        ': ' + data.numberOfThings,
 	 	 			                        '</div>'].join('');
 	 			            	   }else{
 	 			            		return ['<div class="hoverinfo">',
 	 	 			                        '' + geo.properties.name,
 	 	 			                        '</div>'].join('');
 	 			            	  }
 	 			                
 	 			            }
 	 			        },
 	 			        data:mapData
 	 		});

Nothing gets printed on console also.

naveenkumar87 avatar Aug 08 '17 03:08 naveenkumar87

Set position relative (css) to #world-map :-) works for me.

cgpro avatar Dec 17 '17 18:12 cgpro

Set position relative (css) to #world-map :-) works for me.

This worked for me! But I still wonder why it was happening.

asgarli avatar Sep 23 '18 23:09 asgarli