chart class, shortcuts, for loop update.

This commit is contained in:
Bram Barbieri
2024-04-01 13:56:49 +02:00
parent ab8249702e
commit 96d10b32fd
4 changed files with 40 additions and 99 deletions

View 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
}
}
}
}
}