json - d3 chloropleth losing geometry once second dataset is loaded -
i appear losing geometry data when load second json (containing electoral data) d3 chloropleth. prevents me calculating bounding box when want zoom particular electoral district.
here mike's code (showing usa) zooms in , out fine when clicked doesn't overlay data: democra.me/zoom_mike.htm
here live demo (using australia): democra.me/federal2.htm
using chrome console, you'll see mike's correctly displays bounds of state while mine not because d no longer contains feature data, causing clicked() fail.
i want keep map , data in separate files future flexibility (so matching id keep them in sync when loading) how can preserve geometry runtime?
(the tooltips div outside svg , don't affect problem.)
thx
Comments
Post a Comment