如何移除Angularjs圆环图的边框线并减少弧的厚度。
HTML
<canvas id="doughnut" class="chart chart-doughnut" chart-colors="preColors" chart-dataset-override="datasetOverridePres" chart-dataset-options="preLegend" chart-data="preData" chart-labels="preName">
</canvas>
JS
$scope.preColors = ['#febe05','#f3f3f3'];
$scope.preData = [343,78];
谢谢
答案 0 :(得分:4)
我改变了你的代码(我认为chart-dataset-options不正确):
<canvas id="doughnut" class="chart chart-doughnut"
chart-colors="preColors"
chart-options="preLegend"
chart-data="preData"
chart-labels="preName"
chart-dataset-override="preOverride">
</canvas>
和JS:
$scope.preColors = ['#febe05', '#f3f3f3'];
$scope.preData = [343, 78];
$scope.preName = ['a', 'b'];
$scope.preLegend = {
cutoutPercentage: 80, //arc thickness
elements: {
arc: {
borderWidth: 0 // border line
}
}
}
$scope.preOverride = [{}];
结果:
现场演示:SkinnyDoughnout