GithubHelp home page GithubHelp logo

ferret1964 / fishbone-diagram-angular Goto Github PK

View Code? Open in Web Editor NEW

This project forked from abishek/fishbone-diagram-angular

0.0 0.0 0.0 2.99 MB

Fishbone Diagrams using D3JS in Angular 12

Home Page: https://abishek.github.io/fishbone-diagram-angular/

License: MIT License

JavaScript 7.26% TypeScript 84.52% CSS 3.31% HTML 4.92%

fishbone-diagram-angular's Introduction

Fishbone Diagram for Angular 13/14

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.

For Angular 14, use v0.4.2. This version does not have support for clearing the nodes. For Angular 13, use v0.4.3-13. This has support for clearing the nodes as well. It doesn't make enough sense to support an older version of angular, but I just have that need so I've built that in first. I'll resolve this asap.

Usage

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.

Inputs and Outputs

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.

Planned Features

  • 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 :)

fishbone-diagram-angular's People

Contributors

abishek avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.