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