我正在使用 canvasjs 创建一个圆环图 - 图表本身效果很好,但我希望将标签从图表本身中删除,并且只显示在工具提示中。
我根据我在 canvasjs 网站上阅读的内容尝试了以下内容,但它没有隐藏标签:
<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();
有没有办法停止图表本身中显示的标签,但仍有标签值可用于工具提示?