cleaned up chart view.js