Fixed TypeError in Chart.js