微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Ggraph 节点链接绘制库

程序名称:Ggraph

授权协议: MIT

操作系统: 跨平台

开发语言: JavaScript

Ggraph 介绍

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

Ggraph 官网

https://github.com/pcbje/ggraph

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐