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.

29 lines
863 B

  1. sigma.parsers.json
  2. ==================
  3. Plugin developed by [Alexis Jacomy](https://github.com/jacomyal).
  4. ---
  5. 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.
  6. 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.
  7. ````javascript
  8. sigma.parsers.json(
  9. 'myGraph.json',
  10. { container: 'myContainer' }
  11. );
  12. ````
  13. It is also possible to update an existing instance's graph instead.
  14. ````javascript
  15. sigma.parsers.json(
  16. 'myGraph.json',
  17. myExistingInstance,
  18. function() {
  19. myExistingInstance.refresh();
  20. }
  21. );
  22. ````