-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
107 lines (106 loc) · 2.83 KB
/
index.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="simpleflowchart.jquery.css">
<link rel="stylesheet" href="style.css">
<title>Flow Chart Demo</title>
</head>
<body>
<h1 style="text-align:center;">Flow Chart Demo</h1>
<div class="chart"></div>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="simpleflowchart.jquery.js"></script>
<script>
var myData = [{
"id": 1,
"text": "Are you interested in the new position you are applying to?",
"start": true,
"answers": [
{
"text": "Yes",
"link": 2,
"class": "decision-success"
}, {
"text": "No",
"link": 3,
"class": "decision-error"
}
]
}, {
"id": 2,
"text": "Great, moving to next question..",
"informative": true,
"link": 4
}, {
"id": 3,
"text": "OK, great to see you, have a nice day!",
"finish": true,
}, {
"id": 4,
"text": "Do you think your skills are a good fit for the new role?",
"answers": [
{
"text": "Yes",
"link": 5,
"class": "decision-success"
}, {
"text": "No",
"link": 6,
"class": "decision-error"
}
]
}, {
"id": 5,
"text": "Great, are you willing to start right away?",
"answers": [
{
"text": "Yes",
"link": 7,
"class": "decision-success"
}, {
"text": "No",
"link": 8,
"class": "decision-error"
}
]
}, {
"id": 6,
"text": "That's ok, life is a continuous learning journey..",
"informative": true,
"link": 9,
}, {
"id": 7,
"text": "Welcome onboard, we are thrilled to have you!",
"finish": true,
}, {
"id": 8,
"text": "Thank you for your time, let us know when you are ready!",
"informative": true,
"finish": true,
}, {
"id": 9,
"text": "Are you willing to learn the skills required for the new role?",
"answers": [
{
"text": "Yes",
"link": 7,
"class": "decision-success"
}, {
"text": "No",
"link": 10,
"class": "decision-error"
}
]
}, {
"id": 10,
"text": "We are sorry to hear that, such a waste of a good bunch of neurons!",
"finish": true,
}
]
$('.chart').simpleflowchart({ data: myData });
</script>
</body>
</html>