This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

d3-gib
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

This class basically it's an opinionated ES6 class wrapper for a d3 force graph using svg.

You can call the add/remove methods to add and remove nodes and links dynamically. It has drag, zoom, pan, etc., built in with overridable methods for each.

Each node is a node group (instead of a simple "circle"), with each node shape being either a circle or a rect. You can have node images, node labels, node hyperlinks (because I used vimperator RIP, VimFX and others don't quite pick up the buried tags).

Just about every possible data function is exposed as an overridable method, e.g. handleDragged(d), getNodeShape(d), etc. If something is not exposed, then you can override the corresponding init function to tweak it. NOTE: This comes possibly at a cost of performance, but I haven't done any benchmarks. This class is more about convenience than high performance.

There is also a slightly tested child graph functionality, which duplicates the parent graph, but I haven't used it yet in production.

See https://bl.ocks.org/bill-mybiz/dfe5b70ad9b469e23b8820790fa53109 for an example.

Dependencies (4)

Dev Dependencies (5)

Package Sidebar

Install

npm i d3-gib

Weekly Downloads

5

Version

0.0.4

License

MIT

Last publish

Collaborators

  • wraiford