{
const svg = d3
.create("svg")
.attr("viewBox", [0, 0, width, height])
for(var iter=0; iter<50; iter++) {
const g = svg.append('g');
g.append('path')
.attr('stroke', 'black')
.attr('fill', 'none')
.attr('d', line(data.slice(0,cutoff)));
g.append('line')
.attr('stroke', 'black')
.attr('stroke-width', 1)
.attr('x1', x(cutoff-1))
.attr('x2', x(cutoff)+horizontalJump)
.attr('y1', y(data[cutoff-1]))
.attr('y2', y(data[cutoff])+verticalJump)
g.append('path')
.attr('stroke', 'black')
.attr('fill', 'none')
.attr('d', line(data.slice(cutoff)))
.attr('transform', `translate(${x(cutoff)+horizontalJump-offset},${y(data[cutoff])+verticalJump})`);
g.attr('transform', `translate(0,${iter*6+10})`);
}
return svg.node();
}