嗨,我遵循highcharts網站上的標準教程。 http://docs.highcharts.com/#your-first-chart 我遵循同樣的說明,並編寫了這段代碼。我沒有在屏幕上獲得任何輸出。請檢查,我做了什麼錯誤。高圖給出沒有輸出
最初我試圖從網絡加載j-query,它沒有工作,現在我已經在本地下載它。
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type= "text/javascript" src="/home/bhavuk/Documents/code/django/jquery/jquery.js"></script>
<script type= "text/javascript" src="/home/bhavuk/Documents/code/django/Highcharts/js/highcharts.js"></script>
<script type="text/javascript" src="/js/themes/gray.js"></script>
<script type="text/javascript">
$(function() {
$('#container').highcharts({
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>
<title> high charts </title>
</head>
<body>
<div id="container" style="width:100%; height:400px;"></div>
<p> hey i am learning high charts</p>
</body>
</html>
您是否收到任何錯誤?添加$(document).ready(); –