Ported coffee charts to js


Signed-off-by: Sheik Hassan <solergiga@yahoo.com>
Add a `return` at the beginning of this line. This was implied in the coffeescript code.