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

How to have 2 maps using the same source, but with different information on hover tooltip? #539

Closed coolade2022 closed 2 years ago

coolade2022 commented 2 years ago

Hi, i've successfully added 2 maps to my page, but now i need to add extra and different information to the tooltip of specific states of my country per map, i managed to rewrite (hardcode) the datamap js file to include the information i need on one of the maps, but the other one is showing the same information, and i need to change it to something else, is there another way to do it or a simpler way ?

coolade2022 commented 2 years ago

I managed to modify the india.html example with my own code to solve my problem.