O algoritmo de Layout Aleatório (RL) não é realmente um
algoritmo de layout. Ele apenas coloca os nós em posições calculadas
aleatoriamente dentro de uma região definida pelo usuário. Nevertheless, the Random Layout algorithm
can be useful when a random, initial placement is needed by another
layout algorithm or in cases where an aesthetic, readable drawing
is not important.
Exemplo de RL
A amostra de código a seguir usa a classe RandomLayout. Esta amostra de código mostra como executar um Layout Aleatório:
dojo.require("ibm_ilog.graphlayout.random.RandomLayout"); var randomLayout = new ibm_ilog.graphlayout.random.RandomLayout(); graph.setNodeLayout(randomLayout); graph.performGraphLayout();