ChartJS Line Chart

Multiple Line Chart

by stefanpetrovic

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: 'bar',
  data: {
    labels: ["7/2018-1/2019"],
    datasets: [
	    {
	      label: 'Full Capacity',
	      data: [169],
        backgroundColor: 'rgba(74, 144, 226, 1)',
    	},	
			{
				label: 'Actual Demand',
				data: [138],
        backgroundColor: 'rgba(74, 144, 226, 1)',
			}
		]
  },
  options: {
  	scales: {
    	yAxes: [{
        ticks: {
					reverse: false
        }
      }]
    }
  }
}

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