我很难弄清楚这段以粗体标记的代码。请有人给我解释一下这些台词
function growBars() {
var barStartX = 0;
var barStartY = 0;
var barHeight = 0;
var barValue = 0;
<!-- ********** Start Unable to understand -->
barValue = parseInt(chartData.bars[i].value);
barHeight = (barValue * chartHeight / maxValue) / numSteps * idxStep;
barStartX = chartMargin + chartAxisSpace + (i * (barWidth + barMargin)) + barMargin;
barStartY = chartMargin + (chartHeight - barHeight);
drawBar(barStartX, barStartY, barWidth, barHeight);
}
if (idxStep < numSteps) {
idxStep++;
setTimeout('growBars()', growSpeed);
}
} < -- * * * * * * * * * * * * * End till here-- >
function drawBar(barX, barY, barW, barH) {
context.fillStyle = '#00c';
context.fillRect(barX, barY, barW, barH);
context.shadowOffsetX = 3;
context.shadowOffsetY = -3;
context.shadowBlur = 3;
context.shadowColor = 'rgba(200, 200, 200, .3)';
context.strokeStyle = '#000';
context.lineWidth = 1;
context.strokeRect(barX, barY, barW, barH);
}
如您所见,上面的代码在图表上绘制了条形图。我无法理解的是这个递归函数的使用方式。那段代码有什么作用?