Skip to content

dbarton-uk/d3-pathLayout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

d3-pathLayout

d3.js plugin that maps the coordinates of an array of nodes, to points on a given SVG path string.

The plug-in relies on calculations made by the SVG path interface so may yield different results dependant on browser.

Please see here for an example.

Installing

If you use NPM, npm install d3-pathLayout. Otherwise, download the latest release.

Example Usage

var args = {
    nodes : nodes,
    path: path
}

var layout = d3.pathLayout(args);

API Reference

# pathLayout(args)

Constructs a new pathLayout with the given arguments, and runs the algorithm

#pathLayout.nodes(n)

Sets the pathLayout nodes to the given n and runs the algorithm. Returns the existing nodes if n is not passed.

#pathLayout.path(p)

Sets the pathLayout path to the given p and runs the algorithm. Returns the existing path if p is not passed.

About

d3.js plugin that maps the coordinates of an array of nodes to points on a given SVG path string.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors