You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently using this to build out a visualization of my create your own adventure game. Currently I have a script that scans and pushes the lvl identifier into the node and edge arrays with no problem. I noticed in other examples not using JSON you are able to provide an alternate label to the node identifier. Is that possible to do in JSON?
like what is done here:
var fir = graph.newNode({label: 'Sicilian Fir'});
but with JSON.
I hope I am posting in the right place.
The text was updated successfully, but these errors were encountered:
The object passed at node creation is accessible as the node's data property.
e.g.
varnode=graph.newNode({xyz: 42});// You can assign a label manually like this:node.data.label='Hello';// Or access a node's properties..console.log(node.data.xyz);// => 42
Also, depending on the format of your data, if it's a JSON string you'll need to parse it first:
Hi,
I am currently using this to build out a visualization of my create your own adventure game. Currently I have a script that scans and pushes the lvl identifier into the node and edge arrays with no problem. I noticed in other examples not using JSON you are able to provide an alternate label to the node identifier. Is that possible to do in JSON?
like what is done here:
var fir = graph.newNode({label: 'Sicilian Fir'});
but with JSON.
I hope I am posting in the right place.
The text was updated successfully, but these errors were encountered: