我剛剛創建了一個php
頁面,其中包含highcharts
。我遵循他們網站上的指示,結果沒有在圖表上工作。我不知道我的圖表無法正常工作的原因是什麼。還有關於jquery.js的Jq.js,我只是重新命名了它。HighCharts無法正常工作
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<script src="jschart/jq.js"></script>
<script src="jschart/jschart.js"></script>
<script src="jschart/esporting.js"></script>
<script type="text/javascript">
$(function() {
$('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, 3]
}]
});
});
</script>
</head>
<body background="http://www.footpatrol.co.uk/templates/footpatrol.co.uk/_images//blog/_2013/adidas-Rick-Owens-Tech-Runner/adidas-Rick-Owens-Tech-Runner-10.jpg" >
<div id ="content">
\t <div id="container" style="width:100%; height:400px;">asdf</div>
\t <div style="width:100%" >
\t \t <table class="tablename" border="2" style="margin: auto">
\t \t <tr style="font-size:30px">
\t \t \t <th>NCFS</th>
\t \t \t <th>NFCL</th>
\t \t \t <th>MICROTOP</th>
\t \t \t <th>SONION</th>
\t \t \t <th>ZAMA</th>
\t \t \t <th>TOYOTA</th>
\t \t </tr>
\t \t <tr><td>asdfasdf</td>
\t \t \t <td>asdfasdf</td>
\t \t \t <td>asdfasdf</td>
\t \t \t <td>asdfasdf</td>
\t \t \t <td>asdfasdf</td>
\t \t \t <td>asdfasdf</td>
\t \t </tr>
\t \t </table>
\t </div>
</div>
\t
\t
</center>
</body>
</html>
你檢查控制檯? –
你缺少一個散列,應該是'$('#container')({'... – Laazo
ohhh生病檢查它 –