Git Product home page Git Product logo

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

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

fishbone-diagram-angular's Issues

Angular Version 17

Hey, I'm on Angular 17 and the Fishbone is not working.

Do you plan any updates for future angular versions?
Thanks in advance!

Change Size / Resizing

Is there a way how I can change the size of the diagram or even resize it by window-size? The absolute size is often out of the right window-range.

Thanks for this fishbone-diagram-opportunity!

Change width

I haven't found a way to adjust the width of the diagram. Is it possible to change it, or even set it to responsive?

Works so nice so far, thanks very much!

Angular 15

Hey, I'm on Angular 15 and the Ishikawa ist working after finally adding

import { NgxFishboneDiagramModule } from 'ngx-fishbone-diagram';
in the angular module.
Do you plan any updates for future angular versions?
Thanks in advance!

Get png in function

So nice that there is also the possibility to get the png!
Is it possible to get the png file from somewhere else as clicking the [showDowloadButton]="true" ?
I want to put it in a PDF, so I need it when generating the PDF in a function (as base64 would be even better).

Unable to read the node text if it's very long

If the node text is very large, can we have an option to show ellipsis after some text and on click show the complete name in a popover. For now I have to get the short text and full text from server as name and fullname respectively. But I can only show the short text. Could you plz suggest a way to show the full text as well (like in a popover on click of the node)

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.