Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/swimlane/ngx-graph
Graph visualization library for angular
https://github.com/swimlane/ngx-graph
angular angular2 chart dag data-viz directed-graph svg workflow
Last synced: 28 days ago
JSON representation
Graph visualization library for angular
- Host: GitHub
- URL: https://github.com/swimlane/ngx-graph
- Owner: swimlane
- License: mit
- Created: 2017-02-23T17:18:33.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-03-15T16:56:37.000Z (8 months ago)
- Last Synced: 2024-04-14T06:41:22.233Z (7 months ago)
- Topics: angular, angular2, chart, dag, data-viz, directed-graph, svg, workflow
- Language: TypeScript
- Homepage: https://swimlane.github.io/ngx-graph
- Size: 33.7 MB
- Stars: 910
- Watchers: 59
- Forks: 283
- Open Issues: 99
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-node-based-uis - ngx-graph - Graph visualization library for Angular (Javascript Libraries / Renderers)
- fucking-awesome-angular - ngx-graph - Graph visualization library for Angular. (Table of contents / Third Party Components)
- awesome-angular - ngx-graph - Graph visualization library for Angular. (Table of contents / Third Party Components)
README
# ngx-graph
[![Join the chat at https://gitter.im/swimlane/ngx-graph](https://badges.gitter.im/swimlane/ngx-graph.svg)](https://gitter.im/swimlane/ngx-graph?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
A Graph visualization for angular
## Documentation & Demos
https://swimlane.github.io/ngx-graph/
## Installation
1. `npm install @swimlane/ngx-graph --save`
2. Import `NgxGraphModule` into your module
3. Use the `ngx-graph` component in your components## Usage
### Simple
```html
```
### Custom Templates
```html
{{node.label}}
{{link.label}}
```
## Data
### Nodes
```javascript
[
{
id: '1',
label: 'Node A'
},
{
id: '2',
label: 'Node B'
},
{
id: '3',
label: 'Node C'
},
{
id: '4',
label: 'Node D'
},
{
id: '5',
label: 'Node E'
},
{
id: '6',
label: 'Node F'
}
];
```### Edges
```javascript
[
{
id: 'a',
source: '1',
target: '2'
},
{
id: 'b',
source: '1',
target: '3'
},
{
id: 'c',
source: '3',
target: '4'
},
{
id: 'd',
source: '3',
target: '5'
},
{
id: 'e',
source: '4',
target: '5'
},
{
id: 'f',
source: '2',
target: '6'
}
];
```### Clusters
```javascript
[
{
id: 'cluster0',
label: 'Cluster node',
childNodeIds: ['2', '3']
}
];
```## Building ngx-graph
To get started with development, clone a fork of the repository and run `npm install --legacy-peer-deps`.
Run `npm run build:lib` to build ngx-graph. This must be done prior to building the demo.
## Development server
Run `npm run start` to serve the demo at `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
## Building
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
## Running tests
Run `npm run test` to execute the linter
## Release
- Checkout master (`git checkout master`)
- Pull master (`git pull`)
- Refresh node modules (`npm ci`)
- Run tests (`npm test`)
- Examine log to determine next version (X.Y.Z)
- Run `git checkout -b release/X.Y.Z`
- Update version in `projects/swimlane/ngx-graph/package.json`.
- Update changelog in `CHANGELOG.md`
- Run `git commit -am "(release): X.Y.Z"`
- Run `git tag X.Y.Z`
- Run `git push origin HEAD --tags`
- Run `npm run publish:lib`
- Submit PR## Credits
`ngx-graph` is a [Swimlane](http://swimlane.com) open-source project; we believe in giving back to the open-source community by sharing some of the projects we build for our application. Swimlane is an automated cyber security operations and incident response platform that enables cyber security teams to leverage threat intelligence, speed up incident response and automate security operations.
[SecOps Hub](http://secopshub.com) is an open, product-agnostic, online community for security professionals to share ideas, use cases, best practices, and incident response strategies.