Ggraph 是一个基于 D3 构建的复杂混合图形的库,它扩展了节点和链接的概念。非常适合一组或者多组节点连接的展示。
示例代码:
初始化:
ggraph.init(\'container\'); ggraph.draw(converted);
合并节点到组中:
// Merge selected ggraph.merge(selection.all()); // Into single group ggraph.merge([\'Maria West\', \'Sheldon Roy\']); // Into several groups ggraph.merge([ [\'A\', \'B\'], [\'C\', \'D\'] ]);
切分和删除:
ggraph.split([\'Maria West\', \'Sheldon Roy\']); ggraph.remove([\'Maria West\', \'Hazel Santiago\']);
在线演示:https://gransk.com/ggraph.html
构建:
git clone https://github.com/pcbje/ggraph && cd ggraph npm install node_modules/.bin/karma tests/cover.conf.js node_modules/.bin/karma tests/watch.conf.js node_modules/.bin/grunt min
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
暂无评论内容