Igor a610223309 Improve student view | před 5 roky | |
---|---|---|
.. | ||
README.md | před 5 roky | |
sigma.parsers.json.js | před 5 roky |
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();
}
);