Spaces:
Sleeping
Sleeping
Merge branch 'main' of https://huggingface.co/spaces/ale979/slideGraphRetriever
Browse files- simple-example.html +0 -97
simple-example.html
DELETED
|
@@ -1,97 +0,0 @@
|
|
| 1 |
-
<html>
|
| 2 |
-
|
| 3 |
-
<head>
|
| 4 |
-
<title>DataViz</title>
|
| 5 |
-
<style type="text/css">
|
| 6 |
-
#viz {
|
| 7 |
-
width: 1400px;
|
| 8 |
-
height: 700px;
|
| 9 |
-
}
|
| 10 |
-
</style>
|
| 11 |
-
<script src="https://rawgit.com/neo4j-contrib/neovis.js/master/dist/neovis.js"></script>
|
| 12 |
-
</head>
|
| 13 |
-
|
| 14 |
-
<script type="text/javascript">
|
| 15 |
-
var viz;
|
| 16 |
-
function draw() {
|
| 17 |
-
var config = {
|
| 18 |
-
containerId: "viz",
|
| 19 |
-
neo4j: {
|
| 20 |
-
serverUrl: "bolt://localhost:7687",
|
| 21 |
-
serverUser: "neo4j",
|
| 22 |
-
serverPassword: "123testtest"
|
| 23 |
-
},
|
| 24 |
-
labels: {
|
| 25 |
-
SLIDE: {
|
| 26 |
-
[NeoVis.NEOVIS_ADVANCED_CONFIG]: {
|
| 27 |
-
static: {
|
| 28 |
-
shape: "image" // Sets the shape to use an image (use "circularImage" for circular nodes)
|
| 29 |
-
},
|
| 30 |
-
function: {
|
| 31 |
-
image: (node) => "https://slidestorage.s3.eu-north-1.amazonaws.com/" + node.properties.object_id + ".png"
|
| 32 |
-
}
|
| 33 |
-
}
|
| 34 |
-
},
|
| 35 |
-
STORYPOINT:{
|
| 36 |
-
label:"description",
|
| 37 |
-
|
| 38 |
-
[NeoVis.NEOVIS_ADVANCED_CONFIG]: {
|
| 39 |
-
static: {
|
| 40 |
-
caption: "description",
|
| 41 |
-
shape: 'box',
|
| 42 |
-
color: {
|
| 43 |
-
background: 'white',
|
| 44 |
-
border: 'lightgray',
|
| 45 |
-
highlight: {
|
| 46 |
-
background: 'lightblue',
|
| 47 |
-
border: 'blue'
|
| 48 |
-
}
|
| 49 |
-
},
|
| 50 |
-
font: {
|
| 51 |
-
color: 'black',
|
| 52 |
-
size: 14, // Pixel size
|
| 53 |
-
face: 'Arial' // A modern and widely used font
|
| 54 |
-
}
|
| 55 |
-
}
|
| 56 |
-
}
|
| 57 |
-
}
|
| 58 |
-
},
|
| 59 |
-
|
| 60 |
-
relationships: {
|
| 61 |
-
CONTAINS: {
|
| 62 |
-
color: 'gray',
|
| 63 |
-
arrows: {
|
| 64 |
-
to: {
|
| 65 |
-
enabled: true,
|
| 66 |
-
scaleFactor: 1.2 // Makes the arrow slightly larger
|
| 67 |
-
}
|
| 68 |
-
},
|
| 69 |
-
font: {
|
| 70 |
-
color: 'black',
|
| 71 |
-
size: 12,
|
| 72 |
-
face: 'Arial'
|
| 73 |
-
}
|
| 74 |
-
}
|
| 75 |
-
},
|
| 76 |
-
visConfig: {
|
| 77 |
-
edges: {
|
| 78 |
-
arrows: {
|
| 79 |
-
to: { enabled: true }
|
| 80 |
-
}
|
| 81 |
-
}
|
| 82 |
-
},
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
initialCypher: "MATCH (sd:SLIDE_DECK) WITH sd LIMIT 1 MATCH (sd)-[r1:CONTAINS]->(s:SLIDE)-[r2:ASSIGNED_TO]->(sp:STORYPOINT) RETURN sd, r1, s, r2, sp"
|
| 86 |
-
};
|
| 87 |
-
viz = new NeoVis.default(config);
|
| 88 |
-
viz.render();
|
| 89 |
-
|
| 90 |
-
}
|
| 91 |
-
</script>
|
| 92 |
-
|
| 93 |
-
<body onload="draw()">
|
| 94 |
-
<div id="viz"></div>
|
| 95 |
-
</body>
|
| 96 |
-
|
| 97 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|