d3-creed
Force layout chart based on d3.js.
Install
$ npm install d3-creed
Usage
const creed = // create chartvar chart = chart
or in browser:
Examples
$ npm run example
then access http://localhost:9000/examples/.
Basic Example:
Customized Example:
API
creed(options)
Create a new force layout chart with given options.
chart.render(data)
Render the chart with given data.
chart.clear()
Clear the chart.
Customization
You could customize every step when rendering the chart.
-
customize force
chartforce -
customize links rendering
chart {// ...} -
customize nodes rendering
chart {// ...} -
customize links ticking
chart {// ...} -
customize nodes ticking
chart {// ...} -
customize events
// these could be accessed before renderingchartsvgchartdefschartglinkchartgnode// these could be accessed after renderingchartnodeschartlinks