-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgraphlink.html
64 lines (58 loc) · 2 KB
/
graphlink.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<html>
<head>
<script src="assets/go-debug.js"></script>
</head>
<body>
<h1>GoJS</h1>
<ul>
<li><a href="index.html">Home</a></li>
</ul>
<div id="myDiagramDiv" style="width: 700px;height: 700px; background-color: #DAE4E4;"></div>
<script>
var $ = go.GraphObject.make;
var myDiagram = $(go.Diagram,"myDiagramDiv",
{
"undoManager.isEnabled":true
});
myDiagram.model = new go.GraphLinksModel([{key:"Seraph"},{key:"Precet"}],[{from:"Seraph",to:"Precet"}]);
var node = new go.Node(go.Panel.Auto);
var shape = new go.Shape();
shape.figure = "circle";
shape.fill = "lightblue";
var textblock = new go.TextBlock();
textblock.text = "Telkom";
textblock.margin = 15;
node.add(shape);
node.add(textblock);
myDiagram.add(node);
myDiagram.add(
$(go.Node,go.Panel.Auto,
$(go.Shape,{
figure:"RoundedRectangle",
fill:"lightblue"
}),
$(go.TextBlock,{
text:"Indosat",
margin:25
})
)
)
myDiagram.add(
$(go.Node,"Auto",
$(go.Shape,"Circle",{fill:"red"}),
$(go.TextBlock,"Lintas Artha",{margin:5})
)
)
myDiagram.add(
$(go.Node,"Auto",
$(go.Shape,"Circle",
{
fill:$(go.Brush,"Linear",{0.0:"Violet",0.1:"Lavender"})
}
),
$(go.TextBlock,"SangatCepat",{margin:2})
)
)
</script>
</body>
</html>