I downloaded the Radial Partition Diagram source code and easily run it. But my problem is when i put the generateGraph() function call into a setTimeout like following, it doesn’t show anything.
Ah, there’s a bug in RadialLayout where it signals an error if there are no nodes to be laid out (or no vertexes in the Layout.network). We’ll fix that for the next release. Thanks for pointing out the problem.
You can add this “no-vertexes” check to the RadialLayout.doLayout method in the extensions/RadialLayout.js file:
RadialLayout.prototype.doLayout = function(coll) {
if (this.network === null) {
this.network = this.makeNetwork(coll);
}
// without this line there is an exception if there are no nodes:
if (this.network.vertexes.count === 0) return;
if (this.root === null) {
. . .