-
Notifications
You must be signed in to change notification settings - Fork 43
/
example.html
56 lines (54 loc) · 1.39 KB
/
example.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
<!DOCTYPE html>
<html>
<head>
<title>My first Chartist Tests</title>
<link rel="stylesheet" href="node_modules/chartist/dist/chartist.min.css" />
</head>
<body>
<div class="ct-chart ct-perfect-fourth"></div>
<script src="node_modules/chartist/dist/chartist.js"></script>
<script src="src/scripts/chartist-plugin-axistitle.js"></script>
<script>
var chart = new Chartist.Line(
".ct-chart",
{
labels: ["0-15", "16-30", "31-45", "46-60", "61-75", "76-90"],
series: [[1, 3, 7, 12, 1, 2, 1, 0]]
},
{
chartPadding: {
top: 20,
right: 0,
bottom: 20,
left: 0
},
axisY: {
onlyInteger: true
},
plugins: [
Chartist.plugins.ctAxisTitle({
axisX: {
axisTitle: "Time (mins)",
axisClass: "ct-axis-title-test",
offset: {
x: 0,
y: 50
},
textAnchor: "middle"
},
axisY: {
axisTitle: "Goals",
axisClass: "ct-axis-title-test2",
offset: {
x: 0,
y: -1
},
flipTitle: false
}
})
]
}
);
</script>
</body>
</html>