updated chartJS file with one method for each charttype