Skip to content

Instantly share code, notes, and snippets.

@webloglife
Created November 4, 2016 13:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save webloglife/2feb4abca0396eafcc02825ac0e42793 to your computer and use it in GitHub Desktop.
Save webloglife/2feb4abca0396eafcc02825ac0e42793 to your computer and use it in GitHub Desktop.
<canvas id="myChart3" width="150" height="150"></canvas>
<script>
var config = {
type: 'pie',
data: {
datasets: [{
data: [
86.8,
13.2
],
backgroundColor: [
"#058DC7",
"#50B432",
],
label: 'Dataset 1'
}],
labels: [
"リピーター",
"新規ユーザー"
]
},
options: {
responsive: true
}
};
window.onload = function() {
var ctx = document.getElementById("myChart3").getContext("2d");
window.myPie = new Chart(ctx, config);
};
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment