728x90
Chart.js 도넛차트 굵기 조절, 변경하기
How to vary the thickness of doughnut chart, using Chart.Js
- cutoutPercentage 또는 percentageInnerCutout 를 사용하세요
// html
<canvas id="myChart" width="400" height="400"></canvas>
<script>
var ctx = document.getElementById('myChart').getContext('2d');
var myDoughnutChart = new Chart(ctx, {
type: 'doughnut',
data: data,
options: {
cutoutPercentage: 65
}
});
// 또는
var myDoughnutChart = new Chart(ctx, {
type: 'doughnut',
data: data,
options: {
percentageInnerCutout: 65
}
});
</script>
728x90
'프로그래밍 > Chart.js' 카테고리의 다른 글
Chart.js 차트 사이즈 고정하기 (0) | 2020.04.03 |
---|---|
Chart.js 툴팁 사이즈 변경하기 (0) | 2020.04.03 |