src/main/resources/static/js/lib/visjs/graph.js
//cria node user de relacionamento no formato user { login:XXX, avatar_url:YYYY }
cria node user de relacionamento no formato user { login:XXX, avatar_url:YYYY }
cria node user de relacionamento no formato user { login : XXX avatar_url : YYYY }
function createNodeUser(data){
    var name = data.user.name;
    var avatar = data.user.avatarUrl;
    var id = data.user.id;
    createNode(id,name,avatar);
    for (var key in data.friends) {
       if (data.friends.hasOwnProperty(key)) {
         var nameF = data.friends[key].name;
         var avatarF = data.friends[key].avatarUrl;
         var idF =  data.friends[key].id;
         createNode(idF,nameF,avatarF);
         this.edges.add( {from: id, to: idF});
       }
    }
}
function createNodeUser ( data ) { var name = data . user . name ; var avatar = data . user . avatarUrl ; var id = data . user . id ; createNode ( id , name , avatar ) ; for ( var key in data . friends ) { if ( data . friends . hasOwnProperty ( key ) ) { var nameF = data . friends [ key ] . name ; var avatarF = data . friends [ key ] . avatarUrl ; var idF = data . friends [ key ] . id ; createNode ( idF , nameF , avatarF ) ; this . edges . add ( { from : id , to : idF } ) ; } } }
cria node user de relacionamento no formato user { login:XXX, avatar_url:YYYY }
cria node user de relacionamento no formato user { login : XXX avatar_url : YYYY }