-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemp.vue
112 lines (109 loc) · 2.52 KB
/
temp.vue
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
<template>
<Bar id="my-chart-id" :options="chartOptions" :data="chartData" />
</template>
<script>
import { Bar } from 'vue-chartjs'
import { Chart as ChartJS, Title, Tooltip, Legend, BarElement, CategoryScale, LinearScale } from 'chart.js'
ChartJS.register(Title, Tooltip, Legend, BarElement, CategoryScale, LinearScale)
export default {
name: 'BarChart',
components: { Bar },
data() {
return {
chartData: {
labels: [
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"11",
"12",
"13",
"14",
"15"
],
datasets: [
{
label: "WPM",
data: [
83,
84,
87,
81,
77,
74,
63,
66,
67,
69,
68,
69,
65,
63,
60
],
borderColor: "rgba(75, 192, 192, 1)",
backgroundColor: "rgba(75, 192, 192, 0.2)",
fill: false
},
{
label: "Raw WPM",
data: [
96,
84,
96,
84,
96,
72,
12,
84,
72,
96,
48,
84,
24,
48,
96
],
borderColor: "rgba(255, 99, 132, 1)",
backgroundColor: "rgba(255, 99, 132, 0.2)",
fill: false
},
{
label: "Errors",
data: [
0,
0,
0,
1,
2,
1,
1,
0,
0,
0,
0,
0,
1,
0,
2
],
borderColor: "rgba(54, 162, 235, 1)",
backgroundColor: "rgba(54, 162, 235, 0.2)",
fill: false
}
]
},
chartOptions: {
responsive: true
}
}
}
}
</script>