split up chart-view.js