Gathering detailed insights and metrics for cytoscape-cose-bilkent
Gathering detailed insights and metrics for cytoscape-cose-bilkent
Gathering detailed insights and metrics for cytoscape-cose-bilkent
Gathering detailed insights and metrics for cytoscape-cose-bilkent
cytoscape-fcose
The fCoSE layout for Cytoscape.js by Bilkent with fast compound node placement
layout-base
Basic layout model and some utilities for Cytoscape.js layout extensions
cose-base
Core module for compound spring embedder based layout styles
@types/cytoscape-fcose
TypeScript definitions for cytoscape-fcose
The CoSE layout for Cytoscape.js by Bilkent with enhanced compound node placement.
npm install cytoscape-cose-bilkent
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
126 Stars
259 Commits
45 Forks
25 Watching
14 Branches
32 Contributors
Updated on 02 Nov 2024
Minified
Minified + Gzipped
HTML (57.97%)
JavaScript (42.03%)
Cumulative downloads
Total Downloads
Last day
2.4%
156,233
Compared to previous day
Last week
2.1%
762,395
Compared to previous week
Last month
14.9%
3,194,771
Compared to previous month
Last year
215.9%
27,128,909
Compared to previous year
1
1
The CoSE (pron. "cosay", Compound Spring Embedder) layout for Cytoscape.js developed by i-Vis Lab in Bilkent University is a spring embedder layout with support for compound graphs (nested structures) and varying (non-uniform) node dimensions. A faster version of this layout style called fCoSE, also supporting user-defined placement constraints can be found here. (demo, compound demo)
Please cite the following when using this layout:
U. Dogrusoz, E. Giral, A. Cetintas, A. Civril, and E. Demir, "A Layout Algorithm For Undirected Compound Graphs", Information Sciences, 179, pp. 980-994, 2009.
Download the library:
npm install cytoscape-cose-bilkent
,bower install cytoscape-cose-bilkent
, orImport the library as appropriate for your project:
ES import:
1import cytoscape from 'cytoscape'; 2import coseBilkent from 'cytoscape-cose-bilkent'; 3 4cytoscape.use( coseBilkent );
CommonJS require:
1let cytoscape = require('cytoscape'); 2let coseBilkent = require('cytoscape-cose-bilkent'); 3 4cytoscape.use( coseBilkent ); // register extension
AMD:
1require(['cytoscape', 'cytoscape-cose-bilkent'], function( cytoscape, coseBilkent ){ 2 coseBilkent( cytoscape ); // register extension 3});
Plain HTML/JS has the extension registered for you automatically, because no require()
is needed. Just add the following files:
<script src="https://unpkg.com/layout-base/layout-base.js"></script>
<script src="https://unpkg.com/cose-base/cose-base.js"></script>
<script src="cytoscape-cose-bilkent.js"></script>
When calling the layout, e.g. cy.layout({ name: 'cose-bilkent', ... })
, the following options are supported:
1var defaultOptions = { 2 // Called on `layoutready` 3 ready: function () { 4 }, 5 // Called on `layoutstop` 6 stop: function () { 7 }, 8 // 'draft', 'default' or 'proof" 9 // - 'draft' fast cooling rate 10 // - 'default' moderate cooling rate 11 // - "proof" slow cooling rate 12 quality: 'default', 13 // Whether to include labels in node dimensions. Useful for avoiding label overlap 14 nodeDimensionsIncludeLabels: false, 15 // number of ticks per frame; higher is faster but more jerky 16 refresh: 30, 17 // Whether to fit the network view after when done 18 fit: true, 19 // Padding on fit 20 padding: 10, 21 // Whether to enable incremental mode 22 randomize: true, 23 // Node repulsion (non overlapping) multiplier 24 nodeRepulsion: 4500, 25 // Ideal (intra-graph) edge length 26 idealEdgeLength: 50, 27 // Divisor to compute edge forces 28 edgeElasticity: 0.45, 29 // Nesting factor (multiplier) to compute ideal edge length for inter-graph edges 30 nestingFactor: 0.1, 31 // Gravity force (constant) 32 gravity: 0.25, 33 // Maximum number of iterations to perform 34 numIter: 2500, 35 // Whether to tile disconnected nodes 36 tile: true, 37 // Type of layout animation. The option set is {'during', 'end', false} 38 animate: 'end', 39 // Duration for animate:end 40 animationDuration: 500, 41 // Amount of vertical space to put between degree zero nodes during tiling (can also be a function) 42 tilingPaddingVertical: 10, 43 // Amount of horizontal space to put between degree zero nodes during tiling (can also be a function) 44 tilingPaddingHorizontal: 10, 45 // Gravity range (constant) for compounds 46 gravityRangeCompound: 1.5, 47 // Gravity force (constant) for compounds 48 gravityCompound: 1.0, 49 // Gravity range (constant) 50 gravityRange: 3.8, 51 // Initial cooling factor for incremental layout 52 initialEnergyOnIncremental: 0.5 53};
Note that this extension supports only relatively modern browsers. Browsers like IE require significant shimming, for example with core-js.
Note that while running Cytoscape.js in headless mode, stylingEnabled option of Cytoscape.js should be set as true because this extension considers node dimensions and some other styling properties.
npm run test
: Run Mocha tests in ./test
npm run build
: Build ./src/**
into cytoscape-cose-bilkent.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 servernpm run lint
: Run eslint on the sourceN.b. all builds use babel, so modern ES features can be used in the src
.
This project is set up to automatically be published to npm and bower. To publish:
npm run build:release
git commit -am "Build for release"
npm version major|minor|patch
git push && git push --tags
npm publish .
bower register cytoscape-cose-bilkent https://github.com/cytoscape/cytoscape.js-cose-bilkent.git
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 4/8 approved changesets -- score normalized to 5
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
110 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More