Refactor heatChart.js to use time.js.