Open johnwpowell opened 6 years ago
if you have just one basic and one highlight color then it is possible to make it via styles and remove events from map objects
<style>
path.datamaps-subunit {
fill: lightgray;
stroke-width: 0;
}
path.datamaps-subunit:hover {
fill: gray;
stroke-width: 1;
}
</style>
var map = new Datamap({...})
map.svg.selectAll('.datamaps-subunit')
.on('mouseover', '').on('mouseout', '');
map.svg.selectAll('.datamaps-subunit').style.fill = '';
map.svg.selectAll('.datamaps-subunit').style.strokeWidth = '';
https://github.com/markmarkoh/datamaps/pull/367 - More than year ago but still as unmerged request.