Change orientation of Arrow Marker in D3 oriented force graph
<p>I'm trying to insert an arrow marker in each one of my links. But I would like to change the orientation of the arrows, make them face the other end of each link.</p>

<p>Here's the code:</p>

<pre><code>    svg.append("svg:defs").selectAll("marker")
        .data(["end"])      // Different link/path types can be defined here
      .enter().append("svg:marker")
        .attr("id", "end")    // This section adds in the arrows
        .attr("viewBox", "0 -5 10 10")
        .attr("refX", 15)
        .attr("refY", -1.5)
        .attr("markerWidth", 6)
        .attr("markerHeight", 6)
        .attr("orient", 180)
      .append("svg:path")
        .attr("d", "M0,-5L10,0L0,5");

    // add the links and the arrows
    var pg = svg.append("svg:g").selectAll("path")
        .data(force.links())
      .enter().append("g");

    var path = pg.append("path")
        .attr("class", "link")
        .attr("marker-end", "url(#end)")
</code></pre>

<p>how is that possible?</p>

<p>I've tried to change <code>.attr("marker-end", "url(#end)");</code></p>

<p>for <code>.attr("marker-end", "url(#start)");</code></p>

<p>but then the markers just dissapear. One more thing I would like to know is what part of the code defines the curvature of the links and how to change that.</p>

<p>Thank you.</p>