Get started with vivagraphjs CDN
BSD-3-Clause licensed
VivagraphJS: Interactive, customizable web graph/chart library.
Tags:- graph
- drawing
- vivagraph
Stable version
Copied!
How to start using vivagraphjs CDN
<!DOCTYPE html>
<html>
<head>
<title>Get started with vivagraphjs CDN - cdnhub.io</title>
<style>
#graph { width: 800px; height: 600px; border: 1px solid lightgray; }
</style>
</head>
<body>
<div id="graph"></div>
<script src="https://cdn.cdnhub.io/vivagraphjs/0.12.0/vivagraph.min.js"></script>
<script>
// Create a new graph and set the container element
const graph = new vivagraph.Graph('graph');
// Add some nodes
graph.add('A');
graph.add('B');
graph.add('C');
graph.add('D');
// Add edges between nodes
graph.add('A--B');
graph.add('A--C');
graph.add('B--D');
// Render the graph
graph.render();
</script>
</body>
</html>
Copied!
Copied!