I am using canvasjs to create a doughnut chart - the chart itself works great but I want the labels to be removed from the chart itself and only be shown in the tooltip.
I have tried the below based on what I read on the canvasjs site but it does not hide the label:
<div id="chartContainer" style="width:150px; height:150px;"></div>
var chart = new CanvasJS.Chart("chartContainer",
{
animationEnabled: true,
theme: "theme2",
creditText:"",
axisY:{
valueFormatString: " ",
tickLength: 0
},
axisX:{
valueFormatString: " ",
tickLength: 0
},
data: [
{
type: "doughnut",
startAngle:270 ,
toolTipContent: "{label}: {y}",
dataPoints: [
{ y: 2, label: "L1"},
{ y: 3, label: "L2"},
{ y: 8, label: "L3"}
]
}
]
});
chart.render();
Is there a way to stop the label showing in the chart itself but still have a label value to use for the tooltip?