Refactoring charts into own js
Abstracting to work when multiple charts on screen