I'm building a very big graph (more transaction Bitcoin) and I'm working with VivagraphJS but now I want to upgrade my project to ngraph, I'm studying the documentation and now I have some question:
Is it possible to build a Graph dynamically? in the Vivagraph I have to Build the graph with this code.
function buildGraph(){
//Some config
renderer.run();
let fileBlkPromisse = self.dao.loadFileText(pathInput);
await fileBlkPromisse.then(function(fileBlkData) {
// console.debug('File content: ', fileBlkData);
let lines = fileBlkData.split('\n');
let simpleRenderer = 0;
lines.forEach(line => {
if(simpleRenderer === 500000){ return; }
simpleRenderer++;
let token = line.split(stringToken);
let toNode = token[0];
//console.debug('To node with id: ', toNode);
let fromNode = token[token.length - 1];
//console.debug('From node with id: ', fromNode);
self.graph.beginUpdate();
self.graph.addNode(toNode);
self.graph.addNode(fromNode);
//console.debug('Information node is: ', token.slice(1, token.length - 1));
self.graph.addLink(toNode, fromNode, token.slice(1, token.length - 1));
self.graph.endUpdate();
});
// actualIndex++;
//pathInput = self.getNameFile(PATH_RES + 'tx/', '_tx.txt', actualIndex);
}).catch(ex => console.error(ex));
}
The method dao.loadFileText() use the fetch to load the file with all information.
How can run the renderer before I build the graph?
For the moment to render the Big graph I'm using the ngraph.pixel + ngraph.forcelayout, you have a better solution for the velocity (also I'm thinking to use ngraph.native)?
I have some question but I create the question in the appropriate repository.
Hi @anvaka,
I'm building a very big graph (more transaction Bitcoin) and I'm working with VivagraphJS but now I want to upgrade my project to ngraph, I'm studying the documentation and now I have some question:
Is it possible to build a Graph dynamically? in the Vivagraph I have to Build the graph with this code.
The method dao.loadFileText() use the fetch to load the file with all information.
How can run the renderer before I build the graph?
I have some question but I create the question in the appropriate repository.
Thanks for your help