var ctx = document.getElementById("histogram"); var myChart = new Chart(ctx, { type: "line", options: { aspectRatio: 4, }, data: { labels: labels, datasets: datasets }, options: { responsive: true, maintainAspectRatio: false, scales: { y: { stacked: true, beginAtZero: true, title: { display: true, text: 'SSH login attempts' } }, }, layout: { padding: { left: 20, right: 20, top: 20, bottom: 20 } } } });