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:
1) Smooth transition on the arrow head.
2) Better positioning of the arrow heads.
<!DOCTYPE html>
<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='//d3js.org/d3.v4.js'></script>
<script src='vis.js'></script>
</body>
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'lint' ]
2 info using npm@3.10.9
3 info using node@v7.1.0
4 verbose stack Error: missing script: lint
4 verbose stack at run (/usr/local/lib/node_modules/npm/lib/run-script.js:151:19)
4 verbose stack at /usr/local/lib/node_modules/npm/lib/run-script.js:61:5
4 verbose stack at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:356:5
4 verbose stack at checkBinReferences_ (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:320:45)
4 verbose stack at final (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:354:3)
4 verbose stack at then (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:124:5)
4 verbose stack at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:243:12
4 verbose stack at /usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:78:16
4 verbose stack at tryToString (fs.js:425:3)
4 verbose stack at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:412:12)
5 verbose cwd /Users/m/workspace/graph-neighbors/02
6 error Darwin 15.6.0
7 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "lint"
8 error node v7.1.0
9 error npm v3.10.9
10 error missing script: lint
11 error If you need help, you may report this error at:
11 error <https://github.com/npm/npm/issues>
12 verbose exit [ 1, true ]
gimp xcf file � � B� B� gimp-image-grid (style solid)
(fgcolor (color-rgba 0.000000 0.000000 0.000000 1.000000))
(bgcolor (color-rgba 1.000000 1.000000 1.000000 1.000000))
(xspacing 10.000000)
(yspacing 10.000000)
(spacing-unit inches)
(xoffset 0.000000)
(yoffset 0.000000)
(offset-unit inches)
� >� w � )Screen Shot 2017-03-07 at 4.20.58 PM.png �
$ X w � | >� >� >� >� w � H X h x � � � � � � � � ( 8 H X h x � � � � � b r � � � � � � � �
"
2 � � � � � � � � C S c s � � � � � � � � � � . >