Skip to content

Instantly share code, notes, and snippets.

@webloglife
Created November 4, 2016 13:32
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/cc8a225bea5cab8928ea01fa7488ca6b to your computer and use it in GitHub Desktop.
Save webloglife/cc8a225bea5cab8928ea01fa7488ca6b to your computer and use it in GitHub Desktop.
<canvas id="myChart2" width="400" height="250"></canvas>
<script>
var ctx = document.getElementById("myChart2");
var data = {
labels: [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31],
datasets: [
{
label: "ページビュー",
fill: false,
lineTension: 0.1,
backgroundColor: "rgba(75,192,192,0.4)",
borderColor: "rgb(5,141,199)",
borderCapStyle: 'butt',
borderDash: [],
borderDashOffset: 0.0,
borderJoinStyle: 'miter',
pointBorderColor: "rgb(5,141,199)",
pointBackgroundColor: "#fff",
pointBorderWidth: 1,
pointHoverRadius: 5,
pointHoverBackgroundColor: "rgba(75,192,192,1)",
pointHoverBorderColor: "rgba(220,220,220,1)",
pointHoverBorderWidth: 2,
pointRadius: 1,
pointHitRadius: 10,
data: [163,170,150,157,163,207,279,297,204,334,211,228,270,340,267,268,253,200,246,262,267,338,344,369,338,316,273,394,346,398,438],
spanGaps: false,
}
]
};
var myChart = new Chart(ctx, {
type: 'line',
data: data
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment