-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathexample.js
71 lines (69 loc) · 1.28 KB
/
example.js
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
65
66
67
68
69
70
71
var Madeline = require('./madeline.js');
var individuals = [
{
IndividualId: 'm100',
Familyid: 'test',
Name: 'm100',
Gender: 'f',
Affected: 'a'
}, {
IndividualId: 'm101',
Familyid: 'test',
Name: 'John Doe',
Gender: 'm',
Affected: 'b'
}, {
IndividualId: 'm102',
Familyid: 'test',
Name: 'm102',
Gender: 'f',
Affected: 'c'
}, {
IndividualId: 'm103',
Familyid: 'test',
Name: 'm103',
Mother: 'm100',
Father: 'm101',
MZTwin: 'test',
Affected: 'a'
}, {
IndividualId: 'm104',
Familyid: 'test',
Name: 'm104',
Gender: 'f',
Mother: 'm102',
Father: 'm101',
Affected: 'b'
}, {
IndividualId: 'm105',
Familyid: 'test',
Name: 'm105',
Mother: 'm100',
Father: 'm101',
MZTwin: 'test',
Affected: 'c'
}, {
IndividualId: 'm106',
Familyid: 'test',
Gender: 'm',
}, {
IndividualId: 'm107',
Familyid: 'test',
Name: 'm107',
Mother: 'm104',
Father: 'm106',
DZTwin: 'rest',
Affected: 'a'
}, {
IndividualId: 'm108',
Familyid: 'test',
Name: 'm108',
Mother: 'm104',
Father: 'm106',
DZTwin: 'rest',
DOB: '12/12/12',
Affected: 'a'
}
];
var svg = Madeline.draw(individuals, ['name', 'DOB']);
console.log(svg);