Encapsulated chart rendering into a Revealing Module as per http://appendto.com/2010/10/how-good-c-habits-can-encourage-bad-javascript-habits-part-1/