Contoh Graph Visualisasi Javascript
<!DOCTYPE html>
<html lang="en">
<head>
<title>Vis Network | Edge Styles | Arrows</title>
<script type="text/javascript" src="https://visjs.github.io/vis-network/standalone/umd/vis-network.min.js"></script>
<style type="text/css">
#mynetwork {
width: 600px;
height: 400px;
border: 1px solid lightgray;
}
</style>
</head>
<body>
<p>
There are a lot of options with arrows! They can also be combined with
dashed lines.
</p>
<div id="mynetwork"></div>
<script type="text/javascript">
// create an array with nodes
var nodes = new vis.DataSet([{
id: 1,
label: "S"
},
{
id: 2,
label: "A"
},
{
id: 3,
label: "B"
},
{
id: 4,
label: "C"
},
{
id: 5,
label: "D"
},
{
id: 7,
label: "x"
},
]);
// create an array with edges
var edges = new vis.DataSet([{
from: 1,
to: 3,
arrows: "to",
},
{
from: 3,
to: 4,
arrows: "to",
},
{
from: 4,
to: 5,
arrows: "to",
},
{
from: 5,
to: 6,
arrows: "to",
},
]);
// create a network
var container = document.getElementById("mynetwork");
var data = {
nodes: nodes,
edges: edges,
};
var options = {};
var network = new vis.Network(container, data, options);
</script>
</body>
</html>
Lanjut Part : 1
Muhammad Ullil Fahri
WA : 089696380422
Tautan WA : https://wa.me/message/SG4YA2XQP5FPE1