      + " " + (xa(d.ai) + nodeSizeA / 2) + "," + (networkMargin + nodeMargin);
  // console.log(p);
  return p;
};

html.select("svg .labels")
    .attr("transform", "translate(" + (width + nodeMargin * 3) + ", 0)");

var svg = html.select("svg")
    .attr("viewBox", "0 0 " + outerWidth + " " + outerHeight)
  .append("g")
    .attr("transform", "translate(" + margin.left + "," + margin.top + ")");

var networkA = svg.append("g")
    .attr("transform", "translate(0, " + networkMargin + ")");

networkA.append