JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://raw.github.com/mbostock/d3/master/d3.v2.min.js"></script>

JavaScript

var svg = d3.select("body")
            .append("svg")
            .attr("width", 400)
            .attr("height", 300);

var line = d3.svg.line()
    .x(function(d) {return Math.random() * 400; }) 
        .y(function(d) { return Math.random() * 300; });
                     
svg.selectAll("path")
        .data([[1,1],[2,2],[3,3],[4,4],[5,5],[6,6]]).enter()
        .append("path")
            .attr("d", line) // replacing line with M0,0l100,100 draws a line 
            .attr("class", "line")
            .style("stroke", "black" );