-
-
Save webloglife/1c24cb9ef50b60c3898638809ed05c45 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<canvas id="myChart1" width="400" height="250"></canvas> | |
<script> | |
var ctx = document.getElementById("myChart1"); | |
var myChart = new Chart(ctx, { | |
type: 'bar', | |
data: { | |
labels: ["1月", "2月", "3月", "4月", "5月", "6月"], | |
datasets: [{ | |
label: 'PV数', | |
data: [35000, 39500, 103400, 115000, 132851, 183183], | |
backgroundColor: 'rgba(255, 99, 132, 0.2)', | |
borderWidth: 1 | |
}] | |
}, | |
options: { | |
scales: { | |
yAxes: [{ | |
ticks: { | |
beginAtZero:true | |
} | |
}] | |
} | |
} | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment