class working kindof, kan nog niet gelezen worden vanaf andere js file.
This commit is contained in:
@@ -1,27 +1,27 @@
|
||||
class QuestionCreationClass {
|
||||
constructor(data, label) {
|
||||
this.data = data;
|
||||
this.label = label;
|
||||
}
|
||||
// class QuestionCreationClass {
|
||||
// constructor(data, label) {
|
||||
// this.data = data;
|
||||
// this.label = label;
|
||||
// }
|
||||
|
||||
get questionData() {
|
||||
return {
|
||||
labels: this.label,
|
||||
datasets: [{
|
||||
label: 'Responses',
|
||||
data: this.data,
|
||||
backgroundColor: [
|
||||
'rgba(255, 99, 132, 0.2)',
|
||||
'rgba(54, 162, 235, 0.2)',
|
||||
'rgba(255, 206, 86, 0.2)'
|
||||
],
|
||||
borderColor: [
|
||||
'rgba(255, 99, 132, 1)',
|
||||
'rgba(54, 162, 235, 1)',
|
||||
'rgba(255, 206, 86, 1)'
|
||||
],
|
||||
borderWidth: 1
|
||||
}]
|
||||
};
|
||||
}
|
||||
}
|
||||
// get questionData() {
|
||||
// return {
|
||||
// labels: this.label,
|
||||
// datasets: [{
|
||||
// label: 'Responses',
|
||||
// data: this.data,
|
||||
// backgroundColor: [
|
||||
// 'rgba(255, 99, 132, 0.2)',
|
||||
// 'rgba(54, 162, 235, 0.2)',
|
||||
// 'rgba(255, 206, 86, 0.2)'
|
||||
// ],
|
||||
// borderColor: [
|
||||
// 'rgba(255, 99, 132, 1)',
|
||||
// 'rgba(54, 162, 235, 1)',
|
||||
// 'rgba(255, 206, 86, 1)'
|
||||
// ],
|
||||
// borderWidth: 1
|
||||
// }]
|
||||
// };
|
||||
// }
|
||||
// }
|
Reference in New Issue
Block a user