You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
varDOTstring="digraph { a [label=12, entity_id=12, entity_class=\"truck\"]; b [label=7, entity_id=7,entity_class=\"bike\"]; c [label=3, entity_id=3, entity_class=\"car\"]; a -> b[label=\"solid edge\"]; a -> b [label=\"dashed edge\", style=dashed]; a -> c [label=\"dashed edge\", style=dashed]; a -> c [label=\"dotted edge\", style=dotted]; }";
91
+
varparsedData=vis.network.convertDot(DOTstring);
35
92
36
-
<scripttype="text/javascript">
93
+
data={
94
+
nodes: parsedData.nodes,
95
+
edges: parsedData.edges
96
+
}
37
97
38
-
// initialize global variables.
39
-
varedges;
40
-
varnodes;
41
-
varnetwork;
42
-
varcontainer;
43
-
varoptions,data;
98
+
varoptions=parsedData.options;
99
+
options.nodes={
100
+
shape: "dot"
101
+
}
44
102
45
-
46
-
// This method is responsible for drawing the graph, returns the drawn network
varDOTstring="digraph { a [label=12, entity_id=12, entity_class=\"truck\"]; b [label=7, entity_id=7,entity_class=\"bike\"]; c [label=3, entity_id=3, entity_class=\"car\"]; a -> b[label=\"solid edge\"]; a -> b [label=\"dashed edge\", style=dashed]; a -> c [label=\"dashed edge\", style=dashed]; a -> c [label=\"dotted edge\", style=dotted]; }";
0 commit comments