时当我尝试使用简单highcharts例子不确定是不是一个函数,我得到的错误:遗漏的类型错误:使用highcharts
Uncaught TypeError: undefined is not a function
除了:
TypeError: undefined is not a function
at Object.Ya.init (https://code.highcharts.com/highcharts.js:190:496)
at Object.Ya (https://code.highcharts.com/highcharts.js:15:312)
at HTMLDocument.eval (eval at <anonymous> (https://localhost:3000/bower_components/jquery/dist/jquery.js:330:5), <anonymous>:4:15)
at fire (https://localhost:3000/bower_components/jquery/dist/jquery.js:3073:30)
at Object.self.add [as done] (https://localhost:3000/bower_components/jquery/dist/jquery.js:3119:7)
at jQuery.fn.ready (https://localhost:3000/bower_components/jquery/dist/jquery.js:3352:25)
at jQuery.fn.init (https://localhost:3000/bower_components/jquery/dist/jquery.js:2794:16)
at jQuery (https://localhost:3000/bower_components/jquery/dist/jquery.js:76:10)
at eval (eval at <anonymous> (https://localhost:3000/bower_components/jquery/dist/jquery.js:330:5), <anonymous>:1:1)
我的代码在highcharts网站上的简单的例子:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script>
$(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>
我也试过的版本,其中第一行里面
var chart = new Highcharts.Chart({
当我打印出来Highcharts是什么,它去给我正确的对象。 jQuery已加载并正在运行。 我还有什么可以尝试在这一点上?
你可以复制你的exampel作为现场演示吗? – 2014-11-10 11:26:20