datamaps
datamaps copied to clipboard
Tooltip blink on mouseover
If i move the mouse on the area of country, tooltip continuously blinks and it changes country color.
Adding done: function() {},
to the configuration worked for me.
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.
Set position relative (css) to #world-map :-) works for me.
Set position relative (css) to #world-map :-) works for me.
This worked for me! But I still wonder why it was happening.