I trying the EMI calculator module however encounter the error on property 'xAxes' and which is declared here on type '_DeepPartialObject<{ [key: string]: ScaleOptionsByType; }>' .
I'm unable to rech out to developer in github. May I seek for advise in this group?
https://github.com/eskutti/EMI-Calculator/issues/1
this.barChart = new Chart(this.barCanvas.nativeElement, {
type: 'bar',
data: {
labels: labels,
datasets: [{
label: 'Perincipal',
backgroundColor: "rgba(0, 179, 0,0.5)",
data: principals
}, {
label: 'Interest',
backgroundColor: "rgba(255, 26, 26, 0.5)",
data: interests
}]
},
options: {
title: {
display: false,
},
tooltips: {
mode: 'index',
intersect: false
},
responsive: true,
scales: {
xAxes: [{
gridLines: {
display: false
},
stacked: true,
}],
yAxes: [{
gridLines: {
display: false
}, ticks: {
// Include a dollar sign in the ticks
callback: function (value, index, values) {
let n = value;
let d = 2;
let x = ('' + n).length;
let p = Math.pow;
d = p(10, d)
x -= x % 3
return Math.round(n * d / p(10, x)) / d + " kMGTPE"[x / 3]
//return this.abbrNum(value, 2);
}
},
stacked: true,
}]
}
}
});