Javascript Graphics for heat measurement