Matching indexLabelFontColor
by canvasjs
HTML
<script src="https://canvasjs.com/assets/script/canvasjs.min.js"></script>
<br/><!-- Just so that JSFiddle's Result label doesn't overlap the Chart -->
<div id="chartContainer" style="height: 360px; width: 100%;"></div>
JavaScript
var chart = new CanvasJS.Chart("chartContainer",
{
title:{
text: "Index Labels in red"
},
data: [
{
type: "doughnut",
dataPoints: [
{ y: 36, indexLabel:"36%", indexLabelFontColor: "#369EAD" },
{ y: 17, indexLabel:"17%", indexLabelFontColor: "#C24642"},
{ y: 16, indexLabel:"16%", indexLabelFontColor: "#7F6084"},
{ y: 9, indexLabel: "9%", indexLabelFontColor: "#86B402"},
{ y: 8, indexLabel:"8%", indexLabelFontColor: "#A2D1CF"},
{ y: 7, indexLabel: "7%", indexLabelFontColor: "#C8B631"},
{ y: 7, indexLabel: "7%", indexLabelFontColor: "#6DBCEB"}
]
}
]
});
chart.render();