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

Scope Problem in React #325

Open Korbin-Wang opened 8 years ago

Korbin-Wang commented 8 years ago

In the simple HTML document, by setting the scope to different countries and import the corresponding ones, I can get the map of different countries. However, when I try to make it to a react component, the scope only works for 'world' and 'usa'. For example, it will throw an uncaught TypeError " cannot read property of 'chn' of undefined if I try to load the map of china. I'm pretty sure this way works in HTML document and the react component is right. So I suspect it might be some wield settings in the map source, could you answer it?

paprika12 commented 4 years ago

Did you find a solution to this? I have the same problem!

JuggerNaz commented 3 years ago

I try use, react-datamaps and try to scope for other country but with with failure, did someone manage to solve this?