var config = { type: 'line', data: { labels: [["January","First Month","Jellyfish","30 of them"], ["February","Second Month","Foxes","20 of them"], ["March","Third Month","Mosquitoes","None of them"], "April", "May", "June", "July"], datasets: [{ label: "My First dataset", data: [65, 40, 80, 81, 56, 85, 45], backgroundColor: "rgba(255,99,132,0.2)", }, { label: "My Second dataset", data: [40, 80, 21, 56, 85, 45, 65], backgroundColor: "rgba(99,255,132,0.2)", }] }, scales : { xAxes : [{ gridLines : { display : false, lineWidth: 1, zeroLineWidth: 1, zeroLineColor: '#666666', drawTicks: false }, ticks: { display:true, stepSize: 0, min: 0, autoSkip: false, fontSize: 11, padding: 12 } }], yAxes: [{ ticks: { padding: 5 }, gridLines : { display : true, lineWidth: 1, zeroLineWidth: 2, zeroLineColor: '#666666' } }] }, spanGaps: true, responsive: true, maintainAspectRatio: true }; var ctx = document.getElementById("myChart").getContext("2d"); new Chart(ctx, config);
<div class="myChart"> <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.2/Chart.bundle.js"></script> <canvas id="myChart"></canvas> </div>