refactoring timelinechart.js (jsdoc )