This library is a typescript implementation of the d3 fishbone or d3 fishbone and the d3-fishbone-angular library written for angular 1. It is also updated to work with the latest d3 library. I'll be adding a few features to this library going forward, but at the moment, it is just a faithful implementation of the said libraries.
The npm package is published in compatibility ranges. Install the package version whose peer dependency range includes your application's Angular version:
npm install ngx-fishbone-diagram
Each release is compiled and packaged in isolation, so the demo application's Angular version does not affect published library artifacts. See DEPLOY.md for the release and npm publishing process.
| Version | Angular support | npm tag | Install |
|---|---|---|---|
0.5.0 |
13-16 | ng-13-16 |
npm install ngx-fishbone-diagram@0.5.0 |
0.5.1 |
17-19 | ng-17-19 |
npm install ngx-fishbone-diagram@0.5.1 |
0.5.2 |
20-21 | ng-20-21 |
npm install ngx-fishbone-diagram@0.5.2 |
Update this table in the same commit that publishes a new compatibility release. Use the npm dist-tag in the install command when the release should be independently selectable.
You can install the package to your app using
npm i ngx-fishbone-diagram
Once installed, you can display the diagram in your component/page using the following tag
<ngx-fishbone-diagram [data]="data"></ngx-fishbone-diagram>
Here data is a hierarchical JSON with the following format
data = {
"name": "Topic",
"children": [
{"name": "Child 1", "children": [{}]},
{"name": "Child 2", "children": [{}]},
]
}
You can take a look at the test.data.ts file in the repo for the data schema.
The component is intialised with a data input and generates a selected event with the node data on which the select event occured. The component watches for changes to the data input. So between these two we should be able to build a fully functional fishbone session.
- Ability add nodes dynamically
- Conduct a full Fishbone session starting from a empty canvas.
- Ability to customize colours and appearance for the nodes and links.
Please feel free to use github issues to request other features. I'll not be taking pull requests for the time being due to time constraints but I hope to be able to integrate any interesting features from the community in the future.
I'll also try to keep with angular updates from time to time :)