=> p === d.source)
            .classed("target", p => p === d.target);
        }
        
        function arc(d,i) {
          var draw = d3.line().curve(d3.curveBasis);
          var midX = (d.source.x + d.target.x) / 2;
          var midY = (d.source.x - d.target.x);
          return draw([[d.source.x,0],[midX,midY],[d.target.x,0]]);
        }
      }
    </script>
  </body>
</html>
