chart class, shortcuts, for loop update.
This commit is contained in:
27
web/newWebsite/questions-chart-class.js
Normal file
27
web/newWebsite/questions-chart-class.js
Normal file
@@ -0,0 +1,27 @@
|
||||
class ChartConfigClass{
|
||||
constructor(data, text){
|
||||
this.data = data
|
||||
this.text = text
|
||||
}
|
||||
|
||||
get chartConfig() {
|
||||
return{
|
||||
type: 'pie',
|
||||
data: this.data,
|
||||
options: {
|
||||
responsive: true,
|
||||
legend: {
|
||||
position: 'top',
|
||||
},
|
||||
title: {
|
||||
display: true,
|
||||
text: this.text
|
||||
},
|
||||
animation: {
|
||||
animateScale: true,
|
||||
animateRotate: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user