an es2015 d3v4 iteration on the block Force layout graph with colour-coded node neighbours from @samuelleach
First attempt at making a colour-coded graph, with code snippets inspired from the D3 community.
Green => Friend and follower.
Red => Follower
Blue => Friend.
Improvements needed:
Smooth transition on the arrow head.
Better positioning of the arrow heads.
xxxxxxxxxx
<meta charset='utf-8'>
<style>
.node circle {
stroke: white;
stroke-width: 1.5px;
opacity: 1.0;
}
line {
stroke: black;
stroke-width: 1.5px;
stroke-opacity: 1.0;
}
</style>
<body>
<script src='https://d3js.org/d3.v4.js'></script>
<script src='vis.js'></script>
</body>
Modified http://d3js.org/d3.v4.js to a secure url
https://d3js.org/d3.v4.js