window.onload = function () {
var chart = new CanvasJS.Chart("chartContainer",
{
title:{
text: "Index Labels with Big Fonts",
fontSize:15,
},
data: [
{
indexLabelFontSize: 26,
type: "doughnut",
dataPoints: [
{ y: 36, indexLabel:"36%" },
{ y: 17, indexLabel:"17%" },
{ y: 16, indexLabel:"16%" },
{ y: 9, indexLabel: "9%" },
{ y: 8, indexLabel:"8%" },
{ y: 7, indexLabel: "7%" },
{ y: 7, indexLabel: "7%" }
]
}
]
});
chart.render();
}
<script type="text/javascript" src="https://canvasjs.com/assets/script/canvasjs.min.js"></script>
<div id="chartContainer" style="height: 300px; width: 100%;">
</div>