【发布时间】:2014-04-02 18:30:33
【问题描述】:
我使用 Highcharts Bubble 作为其官方网站的示例,并尝试使用 Framework CodeIgniter 对其进行修改。 我在 GoogleChrome 和 Firefox 中运行它,但没有显示任何内容。 这是代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>STATISTIK</title>
</head>
<link href="http://10.16.107.77/statistik/public/css/main.css" rel="stylesheet">
<script src="http://10.16.107.77/statistik/public/jquery/jquery-ui-1.10.3/js/jquery-1.9.1.js"></script>
<script src="http://10.16.107.77/statistik/public/jquery/jquery-ui-1.10.3/js/jquery-ui-1.10.3.custom.js"></script>
<script src="http://10.16.107.77/statistik/public/jquery/jquery.validate.js"></script>
<style>
#content {
position: relative;
}
#content img {
position: absolute;
top: 0px;
right: 10px;
}
</style>
<body>
<div id="content">
</div>
<!--link rel="stylesheet" type="text/css" href="http://10.16.107.77/statistik/public/css/CreativeCSS3AnimationMenus/css/demo.css" /-->
<script src="http://10.16.107.77/statistik/public/jquery/highcharts.js"></script>
<script src="http://10.16.107.77/statistik/public/jquery/highcharts-more.js"></script>
<script src="http://10.16.107.77/statistik/public/jquery/exporting.js"></script>
<div id="container" style="height: 400px; min-width: 310px; max-width: 600px; margin: 0 auto"></div>
<script>
$(function () {
$('#container').highcharts({
chart: {
type: 'bubble',
zoomType: 'xy'
},
title: {
text: 'Formasi Tenaga Kerja'
},
series: [{
data: [[97,36,1000]],
name: 'Area Medan'
}, {
data: [[25,10,1000]],
name: 'Area Lubuk Pakam'
}, {
data: [[47,47,1000]],
name: 'Area Binjai'
}, {
data: [[75,80,1000]],
name: 'Area Sibolga'
}, {
data: [[60,25,1000]],
name: 'Area Rantau Prapat'
}, {
data: [[100,80,1000]],
name: 'Area Padang Sidempuan'
}, {
data: [[80,55,1000]],
name: 'Area Nias'
}, {
data: [[75,80,1000]],
name: 'Area Pematang Siantar'
}]
});
});
</script></body>
</html>
感谢每一个回复。 问候
【问题讨论】:
-
您是否能够在开发者工具控制台中看到任何错误?
-
您能创建一个显示错误的 JSFiddle 示例吗?
-
也许只有我一个人,但我不明白 PHP 和 CodeIgniter 有什么关系。我在提供的代码中看不到任何痕迹。
-
你的JS文件的路径是否正确?
-
@anurupr。我发现这些错误 TypeError: R is undefined ...boxplot=o(p.column,{fillColor:"#FFFFFF",lineWidth:1,medianWidth:2,states:{hover:... highch...more. js(第 29 行)未捕获的异常:Highcharts 错误 #17:www.highcharts.com/errors/17 它告诉您缺少 highcharts-more.js 上面的代码已经加载了该脚本。但仍然是空白。
标签: javascript highcharts