How to use cytoscape-cola - 2 common examples

To help you get started, we’ve selected a few cytoscape-cola examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rai-project / mlmodelscope / src / components / Model / Cytoscape.js View on Github external
constructor() {
    super();
    cydagre(cytoscape); // register extension
    cycola(cytoscape);
  }
  componentDidMount() {
github saada / container-hive / src / Graph.js View on Github external
import React, { Component, PropTypes } from 'react'

import cytoscape from 'cytoscape'
import jquery from 'jquery'
import contextMenus from 'cytoscape-context-menus'
contextMenus(cytoscape, jquery)

import cycola from 'cytoscape-cola'
import cola from 'cola'
cycola(cytoscape, cola)
import './Graph.css'

class Graph extends Component {
  constructor () {
    super()
    this.state = {
      cy: null
    }
  }

  componentDidMount () {
    console.log('setting up cytoscape...', this.refs.graph)
    this.setState({
      cy: cytoscape({
        container: this.refs.graph,
        elements: [],

cytoscape-cola

The Cola.js physics simulation layout for Cytoscape.js

MIT
Latest version published 2 years ago

Package Health Score

57 / 100
Full package analysis

Popular cytoscape-cola functions