This repository has been archived by the owner on Nov 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 34
/
fivenum.html
93 lines (85 loc) · 1.87 KB
/
fivenum.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
<!doctype html>
<html>
<head>
<title>Box Plot Chart</title>
<script src="../node_modules/chart.js/dist/Chart.bundle.js"></script>
<script src="../build/Chart.BoxPlot.js" type="text/javascript"></script>
<style>
canvas {
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
}
</style>
</head>
<body>
<div id="container" style="width: 75%;">
<canvas id="canvas"></canvas>
<canvas id="canvas2"></canvas>
</div>
<script>
var boxplotData = {
labels: ['A'],
datasets: [{
borderColor: 'black',
data: [
[18882.492, 7712.077, 5830.748, 7206.05]
]
}]
};
var boxplotData2 = {
labels: ['A'],
datasets: [{
borderColor: 'black',
data: [
[18882.492, 7712.077, 5830.748, 7206.05]
]
}]
};
window.onload = function() {
new Chart(document.getElementById("canvas").getContext("2d"), {
type: 'boxplot',
data: boxplotData,
options: {
responsive: true,
legend: {
position: 'top',
},
title: {
display: true,
text: 'Quantiles type 7'
},
scales: {
yAxes: [{
ticks: {
quantiles: 'quantiles'
}
}]
}
}
});
new Chart(document.getElementById("canvas2").getContext("2d"), {
type: 'boxplot',
data: boxplotData2,
options: {
responsive: true,
legend: {
position: 'top',
},
title: {
display: true,
text: 'Quantiles Fivenum'
},
scales: {
yAxes: [{
ticks: {
quantiles: 'fivenum'
}
}]
}
}
});
};
</script>
</body>
</html>