updated js for linechart