Error when installing layout

74 views
Skip to first unread message

Alexis Jotz

unread,
Aug 3, 2023, 8:35:49 AM8/3/23
to cytoscape-helpdesk
Hi,

I'm just new at using Cytoscape for testing, hope it gonna work !

I'm on a classic app (Apache with PHP/HTML/JS)
Cytoscape works but I can't use layout extensions

I've added the Dagre layout, including the JS (from CDN) files on my project:
- cytoscape.min.js
- cytoscape.umd.min.js
- cytoscape-dagre.min.js

But I got an JS error at every try : 
Uncaught TypeError: Cannot read properties of undefined (reading 'graphlib')

I've tried to install the graphlib js file but same results :/

I've only tried the example code and changed the layout :
var cy = cytoscape({
  container: document.getElementById('cy'),
  elements: [
    { data: { id: 'a' } },
    { data: { id: 'b' } },
    {
      data: {
        id: 'ab',
        source: 'a',
        target: 'b'
      }
    }],
  layout: {
    name: 'dagre',
    rows: 1
  }
});

Did I miss something ?

Thanks

Scooter Morris

unread,
Aug 3, 2023, 8:51:45 AM8/3/23
to cytoscape-helpdesk
Hi Alexis,

This list is for the Cytoscape desktop app, not for Cytoscape.js.  Generally, people ask questions over on stackoverflow for Cytoscape.js questions.

-- scooter

Alexis Jotz

unread,
Aug 9, 2023, 8:15:03 PM8/9/23
to cytoscape-helpdesk
Oh
Ok nevermind !
Reply all
Reply to author
Forward
0 new messages