所以我正在尝试使用 HighCharts.js 库来创建图表。这是我的代码:
<html>
<head>
<script src="jquery.min.js"></script>
<script src="highcharts.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var chart1 = new Highcharts.Chart({
chart: { renderTo: 'container', type: 'bar' },
title: { text: 'Fruit Consumption'},
xAxis: { categories: ['Apples', 'Bananas', 'Oranges'] },
yAxis: { title: { text: 'Fruit eaten'} },
series: [ {name: 'Jane', data: [1, 0, 4] }, { name: 'John', data: [5, 7, 3]} ]
});
});
</script>
</head>
<body>
<div id="container" style="width:100%; height:400px;">
</div>
</body>
</html>
我试图在我的浏览器中运行它,但没有任何反应。有人可以告诉我我做错了什么吗?谢谢