我目前正在使用 Canvas.JS 制作一些甜甜圈图表,但我无法找到设置图表厚度的正确方法。
这些文档非常广泛(您可以在这里查看它们),但我似乎无法为我的“问题”找到合适的解决方案。
现在我正在使用以下代码生成图表:
CanvasJS.addColorSet('circColors', [
'#7583B2',
'#E6866A'
]);
var circChartOptions = {
animationEnabled: true,
colorSet: 'circColors',
data: [
{
labelFontColor: '#9EA4AC',
labelFontFamily: 'Lato, sans-serif',
labelFontWeight: 'normal',
indexLabelLineColor: 'white',
type: 'doughnut',
startAngle:-90,
toolTipContent: '{label}: {y} - <strong>#percent%</strong>',
indexLabel: '{label} #percent%',
dataPoints: [
{ y: 37.47, label: 'Mobile' },
{ y: 62.53, label: 'Desktop' }
]
}
]
};
$('#circChart').CanvasJSChart(circChartOptions);
Canvas.JS 是否提供了一种控制图表粗细的方法?任何帮助将不胜感激。
谢谢!