Fix typo 'compact' --> 'graph' for output
[erdiag.git] / examples / example.html
CommitLineData
3ca1e50c 1<h2>MCD graph:</h3>
351d7a84 2<div id="mcd"></div>
3ca1e50c
BA
3
4<h2>MLD graph:</h2>
351d7a84 5<div id="mld"></div>
525c4d2a 6
3ca1e50c
BA
7<h2>SQL instructions:</h2>
8<div id="sql"></div>
9
48a55161 10<script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
525c4d2a
BA
11<script src="parser.js"></script>
12<script>
13 let er =
14 new ErDiags(`
15 [Musician]
8edb29ff 16 +id integer
525c4d2a
BA
17 name
18 band
8edb29ff 19 role varchar not null
525c4d2a
BA
20
21 [Instrument]
6a430a22 22 +name
8edb29ff 23 family varchar not null default "Brass"
525c4d2a
BA
24
25 [Piano]
26 type
27
28 [Guitar]
29 type
30
31 {Play}
32 Musician +
33 Instrument *
34 --
35 event
36
37 is_a
38 Instrument Piano Guitar
39 `);
351d7a84
BA
40 er.drawMcd("mcd"); //,"bubble"
41 er.drawMld("mld");
3ca1e50c 42 er.fillSql("sql");
525c4d2a 43</script>