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: 4 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 (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-10-28T23:32:10.000Z (2 months ago)
- Last Synced: 2024-10-29T15:19:00.929Z (2 months ago)
- Topics: angular, angular2, chart, dag, data-viz, directed-graph, svg, workflow
- Language: TypeScript
- Homepage: https://swimlane.github.io/ngx-graph
- Size: 35.8 MB
- Stars: 936
- Watchers: 59
- Forks: 286
- Open Issues: 103
-
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 `yarn`.
## Development server
Run `yarn start` to serve Storybook at `http://localhost:6006/`. Storybook serves as the development and test environment for ngx-graph.
## Building
Run `yarn build:storybook` to build Storybook to check for production issues. The build artifacts will be stored in the `dist/` directory.
Run `yarn build:lib` to build ngx-graph.
## Running tests
Run `yarn test` to execute the linter.
## Release
- Checkout master (`git checkout master`)
- Pull master (`git pull`)
- Run tests (`yarn ci`)
- 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 `yarn package` to check the package format
- Run `git commit -am "(release): X.Y.Z"`
- Run `git tag X.Y.Z`
- Run `git push origin HEAD --tags`
- Run `yarn 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.