var ctx = document.getElementById('myChart-10').getContext('2d'); var chart = new Chart(ctx, { type: 'horizontalBar', data: { labels: [ 'Експорт (млн. дол. США)', 'Імпорт (млн. дол. США)' ], datasets: [{ label: false, backgroundColor: [ '#1976d2', '#d81b60' ], data: [ 764.2, 682.2 ] }] }, 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] + ''; } } }, } });