var ctx = document.getElementById('myChart-8').getContext('2d'); var chart = new Chart(ctx, { type: 'pie', data: { labels: [ 'Кіпр', 'Нідерланди', 'Польща', 'Сербія', 'Данія', 'Велика британія', 'Німеччина', 'Інші' ], datasets: [{ label: false, backgroundColor: [ '#0d47a1', '#1976d2', '#42a5f5', '#6a1b9a', '#8e24aa', '#ab47bc', '#607d8b', '#90a4ae' ], data: [ 52.4, 22.5, 4.6, 3.5, 3.4, 2.5, 1.9, 9.2 ] }] }, 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] + ''; } } }, } });