File tree Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change @@ -4,3 +4,53 @@ It use an XML format to output the flowcharts. The XML is saved in files with th
4
4
5
5
FlowgorithmJS is a ** _ third-party_ ** tool written in Javascript that can read and display the .fprg files on a web page using SVG format.
6
6
7
+ ## Include library
8
+ ``` js
9
+ < script src= " lib/jquery-3.3.1.min.js" >< / script>
10
+ < script src= " flowgorithm.js" >< / script>
11
+ ```
12
+
13
+ ## Using
14
+
15
+ ``` js
16
+ drawFlowchartFromSource (xmlString,tagId,options);
17
+ ```
18
+ or
19
+
20
+ ``` js
21
+ drawFlowchartFromUrl (fprgUrl,tagId,options);
22
+ ```
23
+
24
+ ## Example
25
+ ``` html
26
+ <!DOCTYPE html>
27
+ <html >
28
+ <head >
29
+ <script src =" lib/jquery-3.3.1.min.js" ></script >
30
+ <script src =" flowgorithm.js" ></script >
31
+ <script >
32
+ var xml = ' <?xml version="1.0"?>
33
+ <flowgorithm fileversion="2.6">
34
+ <attributes>
35
+ <attribute name="name" value="Next number"/>
36
+ <attribute name="authors" value="Andrea Vallorani"/>
37
+ <attribute name="about" value="Print the next of a given number"/>
38
+ </attributes>
39
+ <function name="Main" type="None" variable="">
40
+ <parameters/>
41
+ <body>
42
+ <declare name="N, NEXT" type="Integer" array="False" size=""/>
43
+ <input variable="N"/>
44
+ <assign variable="NEXT" expression="N+1"/>
45
+ <output expression=""Next is " & NEXT"/>
46
+ </body>
47
+ </function>
48
+ </flowgorithm>' ;
49
+ drawFlowchartFromSource (xml,' #f' );
50
+ </script >
51
+ </head >
52
+ <body >
53
+ <div id =" f" ></div >
54
+ </body >
55
+ </html >
56
+ ```
You can’t perform that action at this time.
0 commit comments