+ function showloading() {
+ ctx.fillStyle = "green";
+ ctx.font = "bold 16px Courier";
+ ctx.fillText("loading", (ww / 2) - 40 , (wh / 2) + 8);
+ }
+ function clearplot() {
+ ctx.clearRect(0, 0, ww, wh);
+ }
+ function redraw() {
+ if (cold_d.length && hot_d.length) {
+ clearplot();
+ drawplot(cold_d, "blue");
+ drawplot(hot_d, "red");
+ xaxis();
+ yaxis();
+ } else {
+ showloading();
+ }
+ }