I've been developing an application using Google Chart's Sankey Diagram and I successfully created a Sankey Diagram sample on a web app. But I'm not satisfied with the layout, and I search the internet and came upon d3.js's plugin for Sankey Diagram. It looks really nice and I tested the sample code application from here.
In the code, it calls the external JSON file to use it as nodes:
d3.json("sankey-formatted.json", function(error, graph) { ... });
In the first application I developed, I get my nodes from a multidimensional array like this:
//rows is the multidimensional array
//i got this from the example on Google Charts
data.addRows(rows);
The multidimensional array is a collection of objects that came from an AJAX call.
How can I use this array for the Sankey Diagram? Can I do it without calling an external file?