var ctx = document.getElementById('myChart-4').getContext('2d'); var chart = new Chart(ctx, { type: 'pie', data: { labels: [ 'До 15 років', '16-59 років', 'Понад 60 років' ], datasets: [{ label: false, backgroundColor: [ '#fbc02d', '#1e88e5', '#0d47a1' ], data: [ 18, 62, 20 ] }] }, options: { responsive: true, // legend: { position: 'left', align: 'center' }, tooltips: { mode: 'label', callbacks: { label: function(tooltipItem, data) { var indice = tooltipItem.index; return data.labels[indice] +': '+data.datasets[0].data[indice] + ''; } } }, } });