Hi,
I went through your link - Server-Side Images with GoJS -- Northwoods Software . I am using phantom js and the image is rendering for me on the server side.
I am not able to give nodedataarray , linkdataarray as arguments to the createImage.js
In your example you have given inline as
var nodeDataArray = [
{ key: “Alpha”, color: “lightblue” },
{ key: “Beta”, color: “orange” },
{ key: “Gamma”, color: “lightgreen” },
{ key: “Delta”, color: “pink” }
];
var linkDataArray = [
{ from: “Alpha”, to: “Beta” },
{ from: “Alpha”, to: “Gamma” },
{ from: “Beta”, to: “Beta” },
{ from: “Gamma”, to: “Delta” },
{ from: “Delta”, to: “Alpha” }
];
i want to replace this with
nodeDataArray = JSON.parse(system.args[1]);
linkDataArray = JSON.parse(system.args[2]);
This will let me call the createImage.js as
phantomjs createImage.js nodedataarrayjson linkdataarrayjson
it seems the function page.evaluate is sandboxed and doesnt let me use system arguments inside the function. Could you point me on the right direction to do this ?