lineChart.js edited to be make code more reuseable