implementing line chart in view.html, messing with variables