I am trying to draw a Burndowm chart form a data API.
I have successfully retrieved the data etc.
I now need to draw an ideal Burndown line. This will be from the full sprint estimate number, down to zero. I am using Chart.js to draw the line graph.
I have tried to calculate each day's ideal total using the following code:
var totalSprintEstimate = 148.5;
var totalDays = 10;
var idealIncrement = totalSprintEstimate / totalDays;
var ideal = [];
for (i = 0; i <= totalDays-1; i++) {
ideal.push(idealIncrement * i);
}
ideal.reverse();
With this logic, I always end up one day short of a full total (133 point something) against totalDays = 10-1
or I reach the full 148.5 but with too many days to plot on the graph.
I have tried to look this up on t'internet but have come to a halt as I don't really know what to search for.