I have implemented a progress bar using Bootstrap Vue. Here is the HTML code:
<b-progress :value="getOverallScore" :max=5 variant="primary" animated></b-progress>
The getOverallScore
function calculates an average value based on three different scores.
computed: {
getOverallScore: function () {
var i;
var sum = 0;
for (i = 0; i < this.items.length; i++) {
sum = sum + this.items[i].score;
}
return Number.parseFloat(sum / this.items.length).toFixed(2);
},
}
While testing with
<h5>Overall scores: {{ getOverallScore }}</h5>
, the function works fine, but the progress bar does not fetch the value from it. Any suggestions?
Thanks!