Skip to content

Instantly share code, notes, and snippets.

@marorika
Last active April 4, 2018 16:02
Show Gist options
  • Save marorika/68c31657cbe0514f5b8d0d0a90f1ef79 to your computer and use it in GitHub Desktop.
Save marorika/68c31657cbe0514f5b8d0d0a90f1ef79 to your computer and use it in GitHub Desktop.
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.2/Chart.bundle.min.js"></script>
<canvas id="myPolarArea" style="width: 100%; height: 300px;"></canvas>
<script>
var myPolarAreaElement = document.getElementById("myPolarArea");
var myPolarArea = new Chart(myPolarAreaElement, {
type: 'polarArea', // チャートのタイプ
data: { // チャートの内容
labels: ["one", "two", "three"],
datasets: [{
label: 'polarArea',
lineTension: 0, // ベジェ曲線を無効化
data: [14, 4, 9],
backgroundColor: ['RGBA(182,39,93, 1)', 'RGBA(77,169,155, 1)', 'RGBA(46,106,177,1)'],
borderWidth: 5
}]
},
options: { // チャートのその他オプション
// 設定なし
}
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment