ChartJS Line Chart

Multiple Line Chart

by Dwi Adi Laksono

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.3.0/Chart.js"></script>
<body>
    <canvas id="chartJSContainer" width="600" height="400"></canvas>
</body>

CSS

canvas { background-color : #eee;
}

JavaScript

var options = {
  type: 'line',
  data: {
    labels: [6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21],
    datasets: [
	    {
	      label: 'isian',
	      data: [751,168,152,127,92,59,44,31,30,21,13,14,14,19,17,2],
      	borderWidth: 1
    	}
		]
  },
  options: {
  	scales: {
    	yAxes: [{
        ticks: {
					reverse: false
        }
      }]
    }
  }
}

var ctx = document.getElementById('chartJSContainer').getContext('2d');
new Chart(ctx, options);