I successfully used the updateChoropleth function to animate my data, and now I am trying to have the user click on a link and show all the maps side by side so that they can view individual maps.
The first problem is that the code only allows from one div (e.g., "container"), and I can't figure out to create multiple divs in the code. So what I do is that I create the different divs in the body and then call them one by one. The problem now, however, is that because the legend does not get placed in the "container1" div, it is simply hidden by the second map in "container2". Is there a way to fix this?
I would be ok with having only one legend at the bottom of the page, but I would still need a title for all my maps, and my titles are also in the legend.
Ok, I actually fixed the problem. I had added a "d3.select(".datamaps-legend").remove();" which erases the legend for an animation with the same data. Now, I simply removed it and it works.
Hi,
I successfully used the updateChoropleth function to animate my data, and now I am trying to have the user click on a link and show all the maps side by side so that they can view individual maps.
The first problem is that the code only allows from one div (e.g., "container"), and I can't figure out to create multiple divs in the code. So what I do is that I create the different divs in the body and then call them one by one. The problem now, however, is that because the legend does not get placed in the "container1" div, it is simply hidden by the second map in "container2". Is there a way to fix this?
I would be ok with having only one legend at the bottom of the page, but I would still need a title for all my maps, and my titles are also in the legend.
Any thoughts how to fix this?
Thank you,
Nybi