Javascript examples for Chart.js:Pie Chart
segment true in labels outside pie chart
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/*from w ww .j ava 2 s . c om*/ var chart = new Chart(ctx, { type: 'pie', data: { labels: ['Jan', 'Feb', 'Mar'], datasets: [{ data: [30, 40, 25], backgroundColor: 'rgba(0,119, 220, 0.2)' }] }, options: { plugins: { labels: { render: 'value' } } } }); } </script> </head> <body> <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.0/Chart.min.js"></script> <script src="https://rawgit.com/emn178/chartjs-plugin-labels/master/src/chartjs-plugin-labels.js"></script> <canvas id="ctx"></canvas> </body> </html>