how D3.js requests data from the background. Here"s what I did:
function update () {
$.ajax({
type: "POST",
url: "<%=basePath%>d3/getData.do",
cache : false,
dataType: "json",
success: function(dataset) {
colsePrompt();
console.log(dataset);
draw(dataset);
},
});
}
I wrote a static data in the foreground at that time, and now I want to use ajax to get the data, so I put the previously written data in the background, but it is true that it is passed back to the foreground at this time, but there will be an error in the parsing, and only one node will be generated. I would like to ask how to write to complete the dynamic refresh function?