Added defensive code to the height calculation for <rect> elements, in lineChart and scatter.js