I was trying to visualize my Neo4j data hosted on localhost Neo4j desktop and auradb. But I tried the code below and it just shows me empty white space where nodes should be displayed. I check all my db instances are running and cannot find reason neovis cannot fetch any data from db. Can you help me what i should do to get it right? i tried several other things like neo4j://dbId.databases.neo4j.io and bolt://dbId.databases.neo4j.io but all of them did not work:(
<!doctype html>
<html>
<head>
<title>Neovis.js Simple Example</title>
<style type="text/css">
html, body {
font: 16pt arial;
}
#viz {
width: 900px;
height: 700px;
border: 1px solid lightgray;
font: 22pt arial;
}
</style>
<!-- import from CDN -->
<script src="https://unpkg.com/neovis.js@2.0.2/dist/neovis-without-dependencies.js"></script>
<script
src="https://code.jquery.com/jquery-3.2.1.min.js"
integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="
crossorigin="anonymous"></script>
<script type="text/javascript">
// define config car
// instantiate nodevis object
// draw
var viz;
function draw() {
var config = {
container_id: "viz",
serverUrl: "bolt://127.0.0.1:7687",
serverUser: "cee",
serverPassword: "niax1729@",
//encrypted: "ENCRYPTION_ON",
//trust: "TRUST_SYSTEM_CA_SIGNED_CERTIFICATES",
/*neo4j: {
serverUrl: "neo4j+s://dbId.databases.neo4j.io",
serverUser: "neo4j",
serverPassword: "passwd",
driverConfig: {
encrypted: "ENCRYPTION_ON",
trust: "TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"
}
}, */
labels: {
/* Character: {
label: "name",
value: "pagerank",
group: "community"
} */
},
relationships: {
/* INTERACTS: {
value: "weight"
} */
},
initialCypher: "MATCH p=(n:Review)-[r:Inter]-(m:Review) RETURN p"
};
viz = new NeoVis.default(config);
viz.render();
console.log(viz);
}
</script>
</head>
<body onload="draw()">
<div id="viz"></div>
Cypher query: <textarea rows="4" cols=50 id="cypher"></textarea><br>
<input type="submit" value="Submit" id="reload">
<input type="submit" value="Stabilize" id="stabilize">
</body>
<script>
$("#reload").click(function () {
var cypher = $("#cypher").val();
if (cypher.length > 3) {
viz.renderWithCypher(cypher);
} else {
console.log("reload");
viz.reload();
}
});
$("#stabilize").click(function () {
viz.stabilize();
})
</script>
</html>