Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Open
andrewrgarcia opened this issue Sep 5, 2022 · 0 comments

Comments

@andrewrgarcia
Copy link

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
});
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant