14.Forces 力(有/无导向)图 相关

247 阅读2分钟

Forces (d3-force)

Force-directed graph layout using velocity Verlet integration.使用速度Verlet积分法生成有向力图

  • d3.forceSimulation - create a new force simulation.生成一个力模拟器
  • simulation.restart - reheat and restart the simulation’s timer.重热或者重启模拟器定时器
  • simulation.stop - stop the simulation’s timer.停止模拟器计时
  • simulation.tick - advance the simulation one step.模拟器前进一步
  • simulation.nodes - set the simulation’s nodes.设置模拟器节点
  • simulation.alpha - set the current alpha.设置当前alpha值
  • simulation.alphaMin - set the minimum alpha threshold.设置最小alpha阈值
  • simulation.alphaDecay - set the alpha exponential decay rate.设置alpha指数衰减率
  • simulation.alphaTarget - set the target alpha.设置目标alpha指数
  • simulation.velocityDecay - set the velocity decay rate.设置指数衰减率
  • simulation.force - add or remove a force.添加或者删除一个力
  • simulation.find - find the closest node to the given position.查找给定位置最近的节点
  • simulation.randomSource - set the simulation’s random source.设置模拟器随机源
  • simulation.on - add or remove an event listener.给模拟器添加或者删除一个事件监听
  • force - apply the force.应用力图
  • force.initialize - initialize the force with the given nodes.使用给定节点初始化一个力图
  • d3.forceCenter - create a centering force.创建一个中心力
  • center.x - set the center x-coordinate.设置中心x坐标
  • center.y - set the center y-coordinate.设置中心y坐标
  • center.strength - set the strength of the centering force.设置中心力的力量值
  • d3.forceCollide - create a circle collision force.创建一个环冲撞力
  • collide.radius - set the circle radius.设置环的角度
  • collide.strength - set the collision resolution strength.设置碰撞分辨力
  • collide.iterations - set the number of iterations.设置迭代次数
  • d3.forceLink - create a link force 创造一个链接力
  • link.links - set the array of links.设置爱链接力数组
  • link.id - link nodes by numeric index or string identifier.返回链接节点的数字索引和字符标识符
  • link.distance - set the link distance.设置链接距离
  • link.strength - set the link strength.设置链接强度
  • link.iterations - set the number of iterations.设置迭代次数
  • d3.forceManyBody - create a many-body force.创建一个多体力
  • manyBody.strength - set the force strength.设置力强度
  • manyBody.theta - set the Barnes–Hut approximation accuracy.设置the Barnes–Hut approximation精确度
  • manyBody.distanceMin - limit the force when nodes are close.当节点靠近时力的限制
  • manyBody.distanceMax - limit the force when nodes are far.当节点远离时力的限制
  • d3.forceX - create an x-positioning force.创造一个x定位上的力
  • x.strength - set the force strength. 设置力强度
  • x.x - set the target x-coordinate.设置目标x坐标
  • d3.forceY - create an y-positioning force.创造一个y定位上的力
  • y.strength - set the force strength.设置力强度
  • y.y - set the target y-coordinate.设置目标y坐标
  • d3.forceRadial - create a radial positioning force.设计一个半径定位的力
  • radial.strength - set the force strength.设置力强度
  • radial.radius - set the target radius.设置目标半径
  • radial.x - set the target center x-coordinate.设置目标中心x坐标
  • radial.y - set the target center y-coordinate.设置目标中心y坐标