ElGrapho icon indicating copy to clipboard operation
ElGrapho copied to clipboard

Uncaught TypeError: Cannot read properties of undefined (reading 'x') -- Node edges size limitation?

Open andrewrgarcia opened this issue 2 years ago • 0 comments

I get this error message when I run this model. I suspect it is because the number of nodes and edges is too large for the current algorithm to handle, because when I reduce it to groups 1 - 10, it apparently works.

let model = {
	nodes: [
		{ group: 1 },
		{ group: 2 },
		{ group: 3 },
		{ group: 4 },
		{ group: 5 },
		{ group: 6 },
		{ group: 7 },
		{ group: 8 },
		{ group: 9 },
		{ group: 10 },
		{ group: 11 },
		{ group: 12 },
		{ group: 13 },
		{ group: 14 },
		{ group: 15 },
		{ group: 16 },
		{ group: 17 },
		{ group: 18 },
		{ group: 19 },
		{ group: 20 }
		],
	edges: [
		{ from: 1, to: 2},
		{ from: 1, to: 5},
		{ from: 1, to: 7},
		{ from: 2, to: 3},
		{ from: 2, to: 11},
		{ from: 3, to: 4},
		{ from: 3, to: 8},
		{ from: 4, to: 6},
		{ from: 4, to: 9},
		{ from: 5, to: 6},
		{ from: 5, to: 10},
		{ from: 6, to: 14},
		{ from: 11, to: 12},
		{ from: 11, to: 13},
		{ from: 13, to: 17},
		{ from: 14, to: 15},
		{ from: 14, to: 16},
		{ from: 16, to: 18},
		{ from: 19, to: 20}
		]
};


let graph = new ElGrapho({
  container: document.getElementById('container'),
  model: ElGrapho.layouts.Cluster(model),
  arrows: false,
  width: 500,
  height: 500
});

andrewrgarcia avatar Sep 05 '22 18:09 andrewrgarcia