{"repo":"vasturiano/d3-force-limit","free":true,"listed":false,"github":"https://github.com/vasturiano/d3-force-limit","clone":"git clone https://github.com/vasturiano/d3-force-limit.git","description":"A positioning hard limit force type for the d3-force simulation engine","language":"JavaScript","stars":13,"topics":["d3-force","limit","data-visualization","physics-simulation"],"license":"MIT","category":"analytics","readme_excerpt":"d3.forceLimit ============== [![NPM package][npm-img]][npm-url] [![Build Size][build-size-img]][build-size-url] [![NPM Downloads][npm-downloads-img]][npm-downloads-url] A force type for the d3-force simulation engine to hard limit nodes positions to a specified range. See demo. It can be used, for example to keep nodes within boundaries. It also features a cushioning force that repels nodes away from the boundaries. This can be useful to prevent nodes from accumulating at the edge of the canvas. This force works best if it is used as the last force in the simulation engine chain. See also d3.forceSurface. Quick start or using a script tag then API reference Method Description Default ------------------ -------------------------------------------------------------------------------------------------------------------------- ------------- radius ([ num or fn ]) Getter/setter for the node radius accessor function ( fn(node) ) or a constant ( num ) for all nodes. 1 x0 ([ num or fn ]) Getter/setter for the minimum X accessor function ( fn(node) ) or a constant ( num ) for all nodes. -Infinity x1 ([ num or fn ]) Getter/setter for the maximum X accessor function ( fn(node) ) or a constant ( num ) for all nodes. Infinity y0 ([ num or fn ]) Getter/setter for the minimum Y accessor function ( fn(node) ) or a constant ( num ) for all nodes. -Infinity y1 ([ num or fn ]) Getter/setter for the maximum Y accessor function ( fn(node) ) or a constant ( num ) for all nodes. Infinity z0 ([ num ","default_branch":null,"files":null,"tree":[],"storefront":"/r/vasturiano","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/vasturiano/d3-force-limit/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}