123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8" />
- <title>
- Patents View neo4j
- </title>
- <style type="text/css">
- html,
- body {
- font: 16pt arial;
- }
- #viz {
- width: 900px;
- height: 700px;
- border: 1px solid lightgray;
- font: 22pt arial;
- }
- </style>
- <link href="style.css" rel="stylesheet" />
- <script src="http://code.jquery.com/jquery-2.0.3.min.js" data-semver="2.0.3" data-require="jquery"></script>
- <script src="https://rawgit.com/neo4j-contrib/neovis.js/master/dist/neovis.js"></script>
- <script type="text/javascript">
- var viz;
- function draw() {
- // alert("inside method");
- var config = {
- container_id: "viz",
- server_url: "bolt://50.211.199.151:7687",
- server_user: "neo4j",
- server_password: "test",
- arrows: true,
- labels: {
- "Patent": {
- "caption": "patent_no"
- },
- "Application": {
- "caption": "application_no"
- }
- },
- relationships: {
- },
- initial_cypher: "MATCH (n)-[r:CITES]->(m) RETURN n,r,m LIMIT 25"
- };
- viz = new NeoVis.default(config);
- console.log(JSON.stringify(viz));
- 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>
- <!--
- <body>
- <div>
- <div id="row2">
- <input type="button" value="click" onclick="draw()">
- <div id="viz"></div>
- </div>
- </form>
- </div>
- </body>
- </html>
- -->
|