本文介绍了如何从d3.json()调用Servlet的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用d3绘制一些节点和它们之间的链接。对于带来的数据,我使用一个json名称link.json,并像这样调用它 -
I am using d3 for charting some nodes and links between them. For bringing the data, I used a json name link.json and called it like-
d3.json("linked.json", function(error, graph) {}
为了使它动态我必须调用一个servlet在调用json的地方。我不能这样..请任何人帮助我....
It works properly.But the data of that json is not dynamic. To make it dynamic I must call a servlet in the place of calling the json.I can't do this.. please anyone help me....
推荐答案
URL是一个URL,只需将 linked.json
替换为要调用的servlet的URL servlet返回适当格式化的JSON响应)。
A URL is a URL. Just replace linked.json
with the URL to the servlet you want to call (making sure that the servlet returns suitably formatted a JSON response).
这篇关于如何从d3.json()调用Servlet的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!