Charts rewritten in CoffeeScript