一個Neo4j的暗號查詢的圖形結構,執行:返回使用基於<a href="http://neo4j.com/developer/guide-data-visualization/#_presentation_svg_based_graph_interaction" rel="nofollow">Neo4j docs</a> jquery的
:POST /db/data/transaction/commit
{"statements":[{"statement":"MATCH path = (n)-[r]->(m) RETURN path",
"resultDataContents":["graph","row"]}]}
在Neo4j的瀏覽器
返回圖結構加的行。我想知道如何在jQuery ajax請求中指定("resultDataContents":["graph","row"]
)。我已經試過這不工作:
var request = $.ajax({
type: "POST",
url: "http://localhost:7474/db/data/cypher",
accepts: { json: "application/json" },
dataType: "json",
contentType:"application/json",
data: JSON.stringify({ "query" : "MATCH (n)--(m) RETURN n,m LIMIT 2", "params": {"resultDataContents":["graph","row"]} })
});
基本上我想建立一個Neo4j的瀏覽器克隆在那裏我可以提交查詢和接收結果,也許它們可視化。
什麼是「節點」應該在這裏引用:if(idIndex(nodes,n.id)== null){'?我假設只是一個全球陣列。 – 2016-10-26 13:44:50
@PeteyB是的,它缺少一個聲明'var nodes = [],links = [];' – 2017-02-01 16:33:24