My choropleth is passing all the tests (yay!!! I This is my favorite project!) but there are a couple of things I can’t seem to resolve:
My tooltip – I tried to use d3’s centroid to place the tooltip, but it seems like there’s some kind of offset that I didn’t see in the tutorial files. (lines 72, 76, 77). I hard-coded some correction, but it doesn’t work well if I scroll or resize.
I want my legend to show up in the bottom right corner, and I set x and y accordingly, but it still shows up top left instead. (lines 91-92) I also wanted to give the entire legend a background color. (line 93)
edit – Figured out how to place the legend using “translate”
Here’s the codepen: https://codepen.io/KatyaBarta/pen/LYREjJp?editors=0011
Thank you so much for any help!