move js chart creation to chart_generation.coffee