Test readme linking 2

This commit is contained in:
Pitchaya Boonsarngsuk
2018-01-31 20:06:46 +00:00
parent 2ca7a61dc7
commit 0bfd613d9e

View File

@@ -14,7 +14,7 @@ Remigijus Bartasius and Matthew Chalmers
## Usage ## Usage
Download the [latest release](releases) and load one of Javascript file alongside [D3 4.0](https://github.com/d3/d3). Download the [latest release](https://git.win32exe.tech/brian/d3-spring-model/releases) and load one of Javascript file alongside [D3 4.0](https://github.com/d3/d3).
```html ```html
<script src="https://d3js.org/d3.v4.min.js"></script> <script src="https://d3js.org/d3.v4.min.js"></script>
<script src="d3-spring-model.min.js"></script> <script src="d3-spring-model.min.js"></script>
@@ -33,11 +33,11 @@ The Neighbour and Sampling algorithm tries to group the nodes based on the dista
In order for it to work properly, a distance function should be specified. In order for it to work properly, a distance function should be specified.
<a name="forceNeighbourSampling" href="#forceNeighbourSampling">#</a> d3.<b>forceNeighbourSampling</b>() [<>](https://github.com/sReeper/d3-neighbour-sampling/blob/master/src/neighbourSampling.js "Source") <a name="forceNeighbourSampling" href="#forceNeighbourSampling">#</a> d3.<b>forceNeighbourSampling</b>() [<>](src/neighbourSampling.js "Source")
Initializes the Neighbour and Sampling algorithm with default parameters. Initializes the Neighbour and Sampling algorithm with default parameters.
<a name="neighbourSampling_id" href="#neighbourSampling_id">#</a> <i>neighbourSampling</i>.<b>id</b>([<i>id</i>]) [<>](https://github.com/sReeper/d3-neighbour-sampling/blob/master/src/neighbourSampling.js#L218 "Source") <a name="neighbourSampling_id" href="#neighbourSampling_id">#</a> <i>neighbourSampling</i>.<b>id</b>([<i>id</i>]) [<>](src/neighbourSampling.js#L218 "Source")
If *id* is specified, sets the node id accessor to the specified function and returns this force. If *id* is not specified, returns the current node id accessor, which defaults to the numeric *node*.index: If *id* is specified, sets the node id accessor to the specified function and returns this force. If *id* is not specified, returns the current node id accessor, which defaults to the numeric *node*.index:
@@ -59,7 +59,7 @@ function distance() {
} }
``` ```
<a name="neighbourSampling_neighbourSize" href="#neighbourSampling_neighbourSize">#</a> <i>neighbourSampling</i>.<b>neighbourSize</b>([<i>neighbourSize</i>]) [<>](https://github.com/sReeper/d3-neighbour-sampling/blob/master/src/neighbourSampling.js#L222 "Source") <a name="neighbourSampling_neighbourSize" href="#neighbourSampling_neighbourSize">#</a> <i>neighbourSampling</i>.<b>neighbourSize</b>([<i>neighbourSize</i>]) [<>](src/neighbourSampling.js#L222 "Source")
If *neighbourSize* is specified, sets the neighbour set size to the specified number and returns this force. If *neighbourSize* is not specified, returns the current value, which defaults to 6. If *neighbourSize* is specified, sets the neighbour set size to the specified number and returns this force. If *neighbourSize* is not specified, returns the current value, which defaults to 6.