 d.target])
    .join('path')

  const labaledLinks = newLinks.filter(d => d.type !== undefined)
  linkLabelPath = linkLabelPath.data(labaledLinks, d => [d.source, d.target])
    .join('path')
    .attr('id', (d, i) => `labeledLink${i}`)

  linkLabel = linkLabel.data(labaledLinks, d => [d.source, d.target])
    .join('text')
    .append('textPath')
    .attr('startOffset', '50%')
    .attr('text-anchor', 'middle')
    .attr('alignment-baseline', 'middle')
    .attr('xlink:href', (d, i) => `#labeledLink${i}`