1
我有一個HTML文件下面的代碼:Highchart繪圖問題
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<div id=0 style='width:400px; height:400px'></div>
<script type='text/javascript' src='https://dl.dropboxusercontent.com/u/93241685/jquery.1.9.1.min.js'></script>
<script type='text/javascript' src='https://dl.dropboxusercontent.com/u/93241685/highcharts.js'></script>
<script>
$(function() {
$('#0').highcharts({
chart: {type: 'area',plotBackgroundColor:'white',plotBorderWidth: '',plotShadow: true,zoomType:'undefined'},
title: {text:'TTT'},
xAxis: {title: {text:'trX'}},
yAxis: {title: {text:'Ygrg'}},
tooltip: {pointFormat: '{series.name} {point.x}'},
});});
var chart = $('#0').highcharts();
chart.addSeries({
name: 'S1',
data: [1,2,3,4,5,6,1,2,3,4,5,6,1,2,3,4,5,6]
}, false);
chart.redraw();
</script>
</body>
</html>
當我運行此,僅在div出現與圖表標題之上。沒有其他的!甚至不會出現xAxis標題或yAxis標題。現在,有趣的是,當我試圖在JSFiddle上運行它時,它完美地顯示了圖形。 JSFiddle鏈接也在下面給出。什麼可能是這樣做的問題,在一個HTML文件中,我試圖從文件中刪除額外的位和可能的一切,但仍然沒有用。請幫助。