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