/
FF.html
115 lines (106 loc) · 3.36 KB
/
FF.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
108
109
110
111
112
113
114
115
{% block scripts %}
<script>
var XY_plot = document.getElementById('FFY')
var data = []
var layout = {
title: 'Fetal fraction Y and Preface correlation.',
annotations: [],
legend: {hovermode: 'closest', orientation: 'h'},
hovermode: 'closest',
xaxis: {
showline: true,
zeroline: false,
linecolor: '#636363',
linewidth: 5,
showgrid: false,
gridcolor: '#bdbdbd',
title: 'Fetal Fraction Y'
},
yaxis: {
zeroline: false,
showline: true,
showgrid: false,
linecolor: '#636363',
linewidth: 5,
title: 'Fetal Fraction Preface (%)'
},
};
var backstat = {
y: {{control['FF']}},
x: {{control['FFY']}},
text: {{control['names']|tojson}},
name: 'Negative (N={{control['count']}})',
mode: 'markers',
type: 'scatter',
marker: {color: '#ccccb3'}
}
data.push(backstat);
{% for name in cases['names'] %}
var NCVXYsamps = {
y: [{{cases['FF'][loop.index0]}}],
x: [{{cases['FFY'][loop.index0]}}],
name: {{name|tojson}},
mode: 'markers',
marker: {
size: 10
},
text: {{name|tojson}},
type: 'scatter'
}
data.push(NCVXYsamps);
{% endfor %}
Plotly.newPlot('FFY', data, layout);
</script>
<script>
var XY_plot = document.getElementById('FFX')
var data = []
var layout = {
title: 'Fetal fraction X and Preface correlation.',
annotations: [],
legend: {hovermode: 'closest', orientation: 'h'},
hovermode: 'closest',
xaxis: {
showline: true,
zeroline: false,
linecolor: '#636363',
linewidth: 5,
showgrid: false,
gridcolor: '#bdbdbd',
title: 'Fetal Fraction X'
},
yaxis: {
zeroline: false,
showline: true,
showgrid: false,
linecolor: '#636363',
linewidth: 5,
title: 'Fetal Fraction Preface (%)'
},
};
var backstat = {
y: {{control['FF']}},
x: {{control['FFX']}},
text: {{control['names']|tojson}},
name: 'Negative (N={{control['count']}})',
mode: 'markers',
type: 'scatter',
marker: {color: '#ccccb3'}
}
data.push(backstat);
{% for name in cases['names'] %}
var NCVXYsamps = {
y: [{{cases['FF'][loop.index0]}}],
x: [{{cases['FFX'][loop.index0]}}],
name: {{name|tojson}},
mode: 'markers',
marker: {
size: 10
},
text: {{name|tojson}},
type: 'scatter'
}
data.push(NCVXYsamps);
{% endfor %}
Plotly.newPlot('FFX', data, layout);
</script>
{% endblock %}