JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://d3js.org/d3.v3.min.js"></script>
CSS
body
{
background-color:black;
}
.node {
stroke: #fff;
stoke-width: 1.5 px;
}
.link {
stroke: #999;
stroke-opacity: .6;
}
text {
fill: white;
font: 10px sans-serif;
pointer-events: none;
}
JavaScript
var graph = {
"links": [{
"source": 0,
"value": 1,
"target": 1
}, {
"source": 0,
"value": 1,
"target": 2
}, {
"source": 0,
"value": 1,
"target": 3
}, {
"source": 0,
"value": 1,
"target": 4
}, {
"source": 0,
"value": 1,
"target": 5
}, {
"source": 0,
"value": 1,
"target": 6
}, {
"source": 0,
"value": 1,
"target": 7
}, {
"source": 0,
"value": 1,
"target": 8
}, {
"source": 0,
"value": 1,
"target": 9
}, {
"source": 0,
"value": 1,
"target": 10
}, {
"source": 0,
"value": 1,
"target": 11
}, {
"source": 0,
"value": 1,
"target": 12
}, {
"source": 0,
"value": 1,
"target": 13
}, {
"source": 0,
"value": 1,
"target": 14
}, {
"source": 0,
"value": 1,
"target": 15
}, {
"source": 0,
"value": 1,
"target": 16
}, {
"source": 0,
"value": 1,
"target": 17
}, {
"source": 0,
"value": 1,
"target": 18
}, {
"source": 0,
"value": 1,
"target": 19
}, {
"source": 0,
"value": 1,
"target": 20
}, {
"source": 0,
"value": 1,
"target": 21
}, {
"source": 0,
"value": 1,
"target": 22
}, {
"source": 0,
"value": 1,
"target": 23
}, {
"source": 1,
"value": 1,
...