separated js

tried to separate the js for each chart