私の次のコードはグラフグラフを表示していません。何が間違っているのか分かりません。 Chart.bundle.jsを読み込み、Chart.jsでも試しました。Chart.jsにはグラフが表示されません
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="../src/Chart.bundle.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.4.0/Chart.bundle.js"></script>
</head>
<body>
<div style="width: 75%">
<canvas id="canvas"></canvas>
</div>
<script>
var chartData = {
graphName : 'daily-visitors',
ctx : document.getElementById('canvas').getContext('2d'),
chart : {
labels: ["19\/12","20\/12","21\/12","22\/12","23\/12","24\/12","25\/12","26\/12","27\/12","28\/12","29\/12","30\/12","31\/12","01\/01","02\/01"],
datasets: [
{
label: 'Visitors',
data: [4,6,9,6,16,3,13,11,6,4,7,14,11,18,5],
fillColor: "rgba(151,187,205,0.2)",
strokeColor: "rgba(151,187,205,1)",
pointColor: "rgba(151,187,205,1)",
pointStrokeColor: "#fff",
pointHighlightFill: "#fff",
},
{
label: 'Pageviews',
data: [42,34,64,53,48,4,36,36,25,9,12,25,110,227,75],
fillColor: "rgba(220,220,220,0.2)",
strokeColor: "rgba(220,220,220,1)",
pointColor: "rgba(220,220,220,1)",
pointStrokeColor: "#fff",
pointHighlightFill: "#fff",
pointHighlightStroke: "rgba(220,220,220,1)",
}]
}
};
</script>
</body>
</html>
JSFiddleなどの実例を追加してください –