Accepted answer

The problem is not that the datum (d) attribute isn't being passed: it is. The problem here is just the structure of the data that the link generator is expecting.

If you look at the API, you'll see that the link generator, by default, expects a data structure like this:

  source: foo,
  target: baz

By the way, you can change these properties by using link.source() and

So, if we change your data structure, the console will work:

var svg ="svg");

var myEdges = [{
  source: { in: "934e3e11-3f9b-11e9-b2b9-c54f58764873",
    out: "936807a1-3f9b-11e9-b2b9-c54f58764873"
  target: { in: "934e3e11-3f9b-11e9-b2b9-c54f58764873",
    out: "936807a1-3f9b-11e9-b2b9-c54f58764873"

  .attr("fill", "none")
  .attr("stroke", "blue")
  .style("stroke-width", "2px")
  .attr('dummy', function(d) {
    console.log("dummy here: " + d);
    return d;
  .attr('d', d3.linkVertical()
    .x(function(d) {
    .y(function(d) {
      return d.out;
<script src=""></script>

Finally, these other answers may help you to understand the data structure required by the link generator: and

Related Query

More Query from same tag