Hi All,
I know that I can send an AJAX POST, but my main doubt is what is the object that holds the values of the shown graph?
Let's take the code below, for instance. As we can see the json data is formated in hardcoded way (see: JSON.stringify({year: "2012", customer: "type1"})). It's not what I'm looking for. I need to discovery the object that holds the shown graph, then parse it to json, and just after that make the d3.xhr call, passing the parsed graph as json to server-side.
d3.xhr(url)
.header("Content-Type", "application/json")
.post(
JSON.stringify({year: "2012", customer: "type1"}),
function(err, rawData){
var data = JSON.parse(rawData);
console.log("got response", data);
}
);
Ps.: Anybody could tell me who's the object that holds the graph?
Cheers.