Open patilv opened 10 years ago
Taken from http://datamaps.github.io/#map_election:
var election = new Datamap({
scope: 'usa',
element: document.getElementById('map_election'),
geographyConfig: {
popupTemplate: function(geography, data) {
return '<div class="hoverinfo">' + geography.properties.name + '
Electoral Votes:' + data.electoralVotes + ' '
}
},
...
})
How can information of different variables be added to the tooltip. Currently, only the State name is shown.