I’m searching to implement the text around my circles and I’m basing on these notebooks (first and second). Therefore I wrote path and text consts and entered them into simulation, but seems like as the id is never match. Can anyone tell me what’s wrong or what is happening? You can see my little nb here.
Meantime I thank this community, I’m learning a lot about d3 and the wonderfull Observable.
Happy to help. Yup, this is a tricky one. You were very close! Check out my solution here. I forked your notebook and made a couple of changes to get it to work. Essentially, the way you were assigning the “d” attribute for your paths wasn’t working. I found a simpler solution for you. Still needs some formatting for the text, but this should help!
Thanks Paul! But what’s the problem with using d3.arc() function wasn’t working and what’s the difference by drawing the svg directly? Would it be possible implement d3.arc() ?
Paul I was able to also use d3.arc! Look at this nb with your mods that I modified implementing d3.arc. here, Idk if it misses something but should be works well.
Nice!! Looking really good.
There’s no problem using d3.arc(), just personal preference to use that other function as it’s a bit simpler IMO. What was happening before was you were not actually calling the Arc function (you needed an extra set of parenthesis), so this new approach corrected that (and I think that generally is better to define the arc function outside.)