0.2.0 • Published 6 years ago

dchart-force-image v0.2.0

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

dchart-force-image

符合dchart规范的力引导图,结点可以换图片

安装

npm install dchart-force-image

用法

var Force = require('dchart-force-image');
var force = new Force(this.selector, {
  key : 'name',                //唯一标识结点
  margin: {left: 20, top: 20, right: 20, bottom: 20},
  charge: -600,                //电荷强度,引力/斥力
  linkDistance: 100,           //链接距离
  chargeDistance: 100,         //电荷距离
  radius: 20,                  //圆半径
  gravity: 0.1,                //重力
});
force.render({
  nodes: [{
    imgPath: '',
    name: 'hello1',
    className: 'group1'
  },{
    imgPath: 'iconfont-yulan.png',
    name: 'hello2',
    className: 'train'
  }],
  links: [{
    source: 'hello1',
    target: 'hello2'
  }]
});

案例

在根目录下, 启动
cube start
访问路径
http://localhost:9999/demo.html
0.2.0

6 years ago

0.1.5

8 years ago

0.1.4

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago

0.0.13

9 years ago

0.0.12

9 years ago

0.0.11

9 years ago

0.0.10

9 years ago

0.0.9

9 years ago

0.0.8

9 years ago

0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago