var ctx = document.getElementById('myChart-5').getContext('2d'); var chart = new Chart(ctx, { type: 'bar', data: { labels: [ 'Totally in the region', 'Finance and insurance', 'Industry', 'Agriculture and forestry', 'Transport', 'Inform. and telecomm.', 'Construction', 'Trade', 'Temporary accommodation and catering' ], datasets: [{ label: false, backgroundColor: [ '#1565c0', '#1565c0', '#1565c0', '#1565c0', '#1565c0', '#1565c0', '#1565c0', '#1565c0', '#1565c0' ], data: [ 367, 500, 490, 450, 400, 366, 310, 310, 260 ] }] }, options: { responsive: true, // legend: { position: 'left', align: 'center' }, legend: { display: false }, scales: { yAxes: [{ stacked: true }], xAxes: [{ stacked: true }] }, tooltips: { mode: 'label', callbacks: { label: function(tooltipItem, data) { var indice = tooltipItem.index; return data.labels[indice] +': '+data.datasets[0].data[indice] + ''; } } }, } });