hope someone can help me. So I create 2 or more draggable circles and then I want to connect them with a line or path. How can I do that? And how can I make the line/path follow the circle when I drag it around? Here is the code for the circle creation:
svg.append("circle")
.data([{ x: 250, y: 250, r: 25 }])
.attr('class', 'draggableCircle')
.attr('cx', function(d) { return d.x; })
.attr('cy', function(d) { return d.y; })
.attr('r', function(d) { return d.r; })
.attr("stroke-width", 0)
.attr("stroke", "black")
.attr("id", guid())
.call(drag)
.style('fill', getRandomColor());
Is it somehow possible to hook a line/path to two circles?
With kind regards