/ * A simple example that sets the color of the 4 first nodes in the first graph: */ var colours = new Array("red "," green "," blue "," yellow "); / * graphs is an array of graphs, you can access a graph by its index in the array or by its name, so if the first graph's name is Untitled0, the following sentence are right */ var list1= graphs[0]. list_nodes(); / / 1st form. var list2=Untitled0. list_nodes(); / / 2nd form for (var i = 0; i & lt; colours. length; i++){ if (i > list2. length) break; list2[i]. color = colours[i]}
/ * A simple example that sets the color of the 4 first nodes in the first graph: * / var colours = new Array ("red", "green", "blue", "yellow"); / * graphs is an array of graphs, you can access a graph by its index in the array or by its name, so if the first graph' s name is Untitled0, the following sentence are right * / var list1= graphs[ 0]. list_ nodes (); // 1st form. var list2=Untitled0. list_ nodes (); // 2nd form for (var i = 0; i & lt; colours. length; i++) {if (i > list2. length) break; list2[ i]. color = colours[ i]}