https://github.com/cytoscape/cytoscape.js-dagre

The Dagre layout for DAGs and trees for Cytoscape.js

https://github.com/cytoscape/cytoscape.js-dagre

Science Score: 33.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
    4 of 16 committers (25.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.2%) to scientific vocabulary

Keywords

cytoscapejs cytoscapejs-extension

Keywords from Contributors

labels
Last synced: 10 months ago · JSON representation

Repository

The Dagre layout for DAGs and trees for Cytoscape.js

Basic Info
  • Host: GitHub
  • Owner: cytoscape
  • License: mit
  • Language: JavaScript
  • Default Branch: master
  • Size: 711 KB
Statistics
  • Stars: 262
  • Watchers: 19
  • Forks: 80
  • Open Issues: 2
  • Releases: 9
Topics
cytoscapejs cytoscapejs-extension
Created almost 11 years ago · Last pushed 10 months ago
Metadata Files
Readme License

README.md

cytoscape-dagre

DOI

Description

The Dagre layout for DAGs and trees for Cytoscape.js (demo)

The dagre layout organises the graph using a DAG (directed acyclic graph) system, written by Chris Pettitt. It is especially suitable for DAGs and trees. For more information, please refer to Dagre's documentation.

Dependencies

  • Cytoscape.js ^3.2.0
  • Dagre ^0.8.2

Usage instructions

Download the library: * via npm: npm install cytoscape-dagre, * via bower: bower install cytoscape-dagre, or * via direct download in the repository (probably from a tag).

Import the library as appropriate for your project:

ES import:

```js import cytoscape from 'cytoscape'; import dagre from 'cytoscape-dagre';

cytoscape.use( dagre ); ```

CommonJS require:

```js let cytoscape = require('cytoscape'); let dagre = require('cytoscape-dagre');

cytoscape.use( dagre ); // register extension ```

AMD:

js require(['cytoscape', 'cytoscape-dagre'], function( cytoscape, dagre ){ dagre( cytoscape ); // register extension });

Plain HTML/JS has the extension registered for you automatically, because no require() is needed.

API

Call the layout, e.g. cy.layout({ name: 'dagre', ... }).run(), with options:

```js var defaults = { // dagre algo options, uses default value on undefined nodeSep: undefined, // the separation between adjacent nodes in the same rank edgeSep: undefined, // the separation between adjacent edges in the same rank rankSep: undefined, // the separation between each rank in the layout rankDir: undefined, // 'TB' for top to bottom flow, 'LR' for left to right, align: undefined, // alignment for rank nodes. Can be 'UL', 'UR', 'DL', or 'DR', where U = up, D = down, L = left, and R = right acyclicer: undefined, // If set to 'greedy', uses a greedy heuristic for finding a feedback arc set for a graph. // A feedback arc set is a set of edges that can be removed to make a graph acyclic. ranker: undefined, // Type of algorithm to assign a rank to each node in the input graph. Possible values: 'network-simplex', 'tight-tree' or 'longest-path' minLen: function( edge ){ return 1; }, // number of ranks to keep between the source and target of the edge edgeWeight: function( edge ){ return 1; }, // higher weight edges are generally made shorter and straighter than lower weight edges

// general layout options fit: true, // whether to fit to viewport padding: 30, // fit padding spacingFactor: undefined, // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up nodeDimensionsIncludeLabels: false, // whether labels should be included in determining the space used by a node animate: false, // whether to transition the node positions animateFilter: function( node, i ){ return true; }, // whether to animate specific nodes when animation is on; non-animated nodes immediately go to their final positions animationDuration: 500, // duration of animation in ms if enabled animationEasing: undefined, // easing of animation if enabled boundingBox: undefined, // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } transform: function( node, pos ){ return pos; }, // a function that applies a transform to the final node position ready: function(){}, // on layoutready sort: undefined, // a sorting function to order the nodes and edges; e.g. function(a, b){ return a.data('weight') - b.data('weight') } // because cytoscape dagre creates a directed graph, and directed graphs use the node order as a tie breaker when // defining the topology of a graph, this sort function can help ensure the correct order of the nodes/edges. // this feature is most useful when adding and removing the same nodes and edges multiple times in a graph. stop: function(){} // on layoutstop }; ```

Build targets

  • npm run test : Run Mocha tests in ./test
  • npm run build : Build ./src/** into cytoscape-dagre.js
  • npm run watch : Automatically build on changes with live reloading (N.b. you must already have an HTTP server running)
  • npm run dev : Automatically build on changes with live reloading with webpack dev server
  • npm run lint : Run eslint on the source

N.b. all builds use babel, so modern ES features can be used in the src.

Publishing instructions

This project is set up to automatically be published to npm and bower. To publish:

  1. Build the extension : npm run build:release
  2. Commit the build : git commit -am "Build for release"
  3. Bump the version number and tag: npm version major|minor|patch
  4. Push to origin: git push && git push --tags
  5. Publish to npm: npm publish .
  6. If publishing to bower for the first time, you'll need to run bower register cytoscape-dagre https://github.com/cytoscape/cytoscape.js-dagre.git
  7. Make a new release for Zenodo.

Owner

  • Name: Cytoscape Consortium
  • Login: cytoscape
  • Kind: organization

GitHub Events

Total
  • Issues event: 2
  • Watch event: 19
  • Delete event: 8
  • Issue comment event: 16
  • Pull request event: 13
  • Fork event: 1
  • Create event: 6
Last Year
  • Issues event: 2
  • Watch event: 19
  • Delete event: 8
  • Issue comment event: 16
  • Pull request event: 13
  • Fork event: 1
  • Create event: 6

Committers

Last synced: 10 months ago

All Time
  • Total Commits: 90
  • Total Committers: 16
  • Avg Commits per committer: 5.625
  • Development Distribution Score (DDS): 0.433
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Max Franz m****z@g****m 51
dependabot[bot] 4****]@u****m 10
Manfred Cheung m****n@u****a 6
Harry Adel h****b@g****m 5
Alexander Li a****0@g****m 3
Tyler Reardon t****n@g****m 3
YikaJ 5****9@q****m 2
ethan-keller e****r@s****l 2
Bjørn Fjukstad b****n@c****o 1
Jascha Ephraim j****a@j****m 1
Joseph Stahl j****t@o****m 1
Nathanael Ruf n****7@p****m 1
Sam Kortchmar S****r@b****u 1
Sam Kortchmar s****r@b****u 1
Zachary Blumenfeld z****f@g****m 1
cosipov c****v@i****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 49
  • Total pull requests: 102
  • Average time to close issues: 2 months
  • Average time to close pull requests: 24 days
  • Total issue authors: 44
  • Total pull request authors: 16
  • Average comments per issue: 3.08
  • Average comments per pull request: 1.5
  • Merged pull requests: 19
  • Bot issues: 0
  • Bot pull requests: 85
Past Year
  • Issues: 1
  • Pull requests: 22
  • Average time to close issues: N/A
  • Average time to close pull requests: 22 days
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 1.32
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 22
Top Authors
Issue Authors
  • tylerecouture (3)
  • swarajd (2)
  • Mafti (2)
  • calebeaires (2)
  • knightswatch3 (1)
  • Prophet32j (1)
  • Kyrio (1)
  • ayjayt (1)
  • SOSDAN (1)
  • danielpes (1)
  • feichin-noreja (1)
  • josephrocca (1)
  • YikaJ (1)
  • Jbonavita (1)
  • maxkfranz (1)
Pull Request Authors
  • dependabot[bot] (85)
  • danyelf (2)
  • ayjayt (2)
  • alessandro308 (1)
  • treardon17 (1)
  • N8th8n8el (1)
  • skortchmark9 (1)
  • ethan-keller (1)
  • fjukstad (1)
  • YikaJ (1)
  • bmacphee (1)
  • harryadel (1)
  • zblumen (1)
  • n313893254 (1)
  • josephst (1)
Top Labels
Issue Labels
stale (17)
Pull Request Labels
dependencies (84) stale (72) javascript (8)

Packages

  • Total packages: 10
  • Total downloads:
    • npm 290,976 last-month
    • nuget 2,215 total
  • Total docker downloads: 22,290
  • Total dependent packages: 99
    (may contain duplicates)
  • Total dependent repositories: 693
    (may contain duplicates)
  • Total versions: 93
  • Total maintainers: 8
npmjs.org: cytoscape-dagre

The Dagre layout for DAGs and trees for Cytoscape.js

  • Versions: 20
  • Dependent Packages: 93
  • Dependent Repositories: 643
  • Downloads: 290,162 Last month
  • Docker Downloads: 22,255
Rankings
Dependent packages count: 0.4%
Downloads: 0.5%
Docker downloads count: 0.7%
Dependent repos count: 0.7%
Average: 1.6%
Forks count: 3.3%
Stargazers count: 3.9%
Last synced: 10 months ago
bower.io: cytoscape-dagre

The Dagre layout for DAGs and trees for Cytoscape.js

  • License: MIT
  • Latest release: v2.5.0
    published over 3 years ago
  • Versions: 20
  • Dependent Packages: 1
  • Dependent Repositories: 31
Rankings
Dependent packages count: 3.1%
Dependent repos count: 3.2%
Average: 5.0%
Forks count: 6.1%
Stargazers count: 7.6%
Last synced: 10 months ago
npmjs.org: cytoscape-dagre-cluster-fix

The Dagre layout for DAGs and trees for Cytoscape.js

  • Versions: 4
  • Dependent Packages: 1
  • Dependent Repositories: 0
  • Downloads: 812 Last month
Rankings
Forks count: 4.0%
Stargazers count: 4.8%
Downloads: 5.5%
Average: 11.2%
Dependent packages count: 16.2%
Dependent repos count: 25.3%
Maintainers (1)
Last synced: 10 months ago
repo1.maven.org: org.webjars.bower:cytoscape-dagre

WebJar for cytoscape-dagre

  • Versions: 5
  • Dependent Packages: 4
  • Dependent Repositories: 19
  • Docker Downloads: 35
Rankings
Dependent repos count: 5.6%
Docker downloads count: 6.0%
Average: 13.4%
Dependent packages count: 13.9%
Forks count: 20.1%
Stargazers count: 21.6%
Last synced: 10 months ago
bower.io: ram

The Dagre layout for DAGs and trees for Cytoscape.js

  • License: MIT
  • Latest release: v2.5.0
    published over 3 years ago
  • Versions: 20
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.1%
Forks count: 5.7%
Stargazers count: 7.2%
Average: 13.9%
Dependent repos count: 37.5%
Last synced: 10 months ago
bower.io: sathya

The Dagre layout for DAGs and trees for Cytoscape.js

  • License: MIT
  • Latest release: v2.5.0
    published over 3 years ago
  • Versions: 20
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.1%
Forks count: 5.7%
Stargazers count: 7.2%
Average: 13.9%
Dependent repos count: 37.5%
Last synced: 10 months ago
nuget.org: cytoscape.dagre

The Dagre layout for DAGs and trees for Cytoscape.js

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 2,215 Total
Rankings
Dependent repos count: 12.7%
Dependent packages count: 19.5%
Average: 21.6%
Downloads: 32.7%
Maintainers (1)
Last synced: 10 months ago
repo1.maven.org: org.webjars.bower:github-com-cytoscape-cytoscape-js-dagre

WebJar for cytoscape-dagre

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Forks count: 14.2%
Stargazers count: 16.3%
Average: 27.9%
Dependent repos count: 32.0%
Dependent packages count: 48.9%
Last synced: 10 months ago
repo1.maven.org: org.webjars.npm:github-com-cytoscape-cytoscape-js-dagre

WebJar for cytoscape-dagre

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Forks count: 14.2%
Stargazers count: 16.5%
Average: 27.9%
Dependent repos count: 32.0%
Dependent packages count: 48.9%
Last synced: 10 months ago
npmjs.org: cytoscape-dagre-3

The Dagre layout for DAGs and trees for Cytoscape.js

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 2 Last month
Rankings
Dependent repos count: 28.3%
Average: 34.7%
Dependent packages count: 41.2%
Maintainers (1)
Last synced: 10 months ago

Dependencies

bower.json bower
  • cytoscape ^3.2.0
package-lock.json npm
  • 1614 dependencies
package.json npm
  • @webpack-cli/serve ^0.2.0 development
  • babel-core ^6.26.3 development
  • babel-loader ^8.1.0 development
  • babel-preset-env ^1.7.0 development
  • camelcase ^6.0.0 development
  • chai 4.2.0 development
  • cpy-cli ^3.1.1 development
  • cross-env ^7.0.2 development
  • eslint ^7.6.0 development
  • gh-pages ^3.1.0 development
  • mocha 8.1.1 development
  • npm-run-all ^4.1.5 development
  • rimraf ^3.0.2 development
  • update ^0.7.4 development
  • updater-license ^1.0.0 development
  • webpack ^4.44.1 development
  • webpack-cli ^3.3.12 development
  • webpack-dev-server ^3.11.0 development
  • dagre ^0.8.5