Graph database Analysis of the Steam Network
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

863 B

sigma.parsers.json

Plugin developed by Alexis Jacomy.


This plugin provides a single function, sigma.parsers.json(), that will load a JSON encoded file, parse it, eventually instantiate sigma and fill the graph with the graph.read() method. The main goal is to avoid using jQuery only to load an external JSON file.

The most basic way to use this helper is to call it with a path and a sigma configuration object. It will then instanciate sigma, but after having added the graph into the config object.

sigma.parsers.json(
  'myGraph.json',
  { container: 'myContainer' }
);

It is also possible to update an existing instance's graph instead.

sigma.parsers.json(
  'myGraph.json',
  myExistingInstance,
  function() {
    myExistingInstance.refresh();
  }
);