这个 javascript 代码
var myBarChart = new Chart(document.getElementById("myChart"), {
type: 'horizontalBar',
data: [{x:'2016-12-25', y:20}, {x:'2016-12-26', y:10}],
options: {
scales: {
xAxes: [{
stacked: true
}],
yAxes: [{
stacked: true
}]
}
}
});
<!DOCTYPE html>
<html>
<head>
<title>Title of the document</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.2/Chart.min.js"></script>
</head>
<body>
<canvas id="myChart" width="400" height="400"></canvas>
</body>
</html>
无法正确显示条形图。有谁知道出了什么问题?
谢谢
