我是新的HTML和PHP。我遵循Highcharts.com的入門指南,我寫下了下面的HTML文件。我保存它像index2.htm,但它只顯示我「在劇本之前...」,沒有圖表出現。
請幫助我。 非常感謝簡單Highcharts,但不運行
<DOCTYPE HTML>
<html>
<head>
<script src="http://code.highcharts.com/highcharts.js"></script>
<title>Highcharts Example</title>
</head>
<body>
<div id="container" style="width:100%; height:400px;"></div>
<p>Before the script...</p>
<script>
$(function() {
var myChart = Highcharts.chart('container', {
chart: {
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, 19]
}]
});
});
</script>
</body>
</html>
</pre>
控制檯中的任何錯誤? – wergeld