title: d3 javascript draw line over circle
body: <p>I am new to d3 javascript library. I am trying to draw line over a circle using d3. I am able to create circle but somehow line does not appear on circle. See sample code attached. Any help is highly appreciated.</p>
  
  <pre><code>diag_circles.data(circle_data)
              .enter()
              .append("circle")
              .attr("cx", function (d) {
                  console.log("d.x", d.x);
                  return d.x
              })
              .attr("cy", function (d) {
                  return d.y
              })
              .attr("r", function (d) {
                  return d.r
              })
              .append('line')
              .attr("x1", function(d){return d.x- d.r})
              .attr("y1", function(d){return d.y})
              .attr("x2", function (d) { return d.x+ d.r})
              .attr("y2", function(d){return d.y})
              .attr("stroke-width", 20)
              .attr("stroke", "black");
  </code></pre>
  
  <p><a href="https://jsfiddle.net/c58859xy/" rel="nofollow">https://jsfiddle.net/c58859xy/</a></p>