HighCharts未捕获异常

HighCharts未捕获异常

本文介绍了HighCharts未捕获异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在本地中运行相同的代码,但我从萤火虫

  

script type =text / javascriptsrc =http://code.jquery.com/jquery-latest.js>< / script>
< script type =text / javascriptsrc =http://highcharts.com/js/testing.js>< / script>
< script type =text / javascriptsrc =test.js>< / script> //我的js文件

同样的事情发生在。

任何人都知道为什么会发生这种情况?

编辑:我找到了问题的原因。实际上,我必须在<$ c $>之后放置< script type =text / javascriptsrc =test.js>< / script> c>< div id =container>< / div> 标记,否则未捕获的异常将显示,即使我将< script> 中的c $ c>标记。我从来没有把脚本文件放在< body> 标签之前,这是我第一次遇到这个问题。有人可以解释为什么会发生这种情况吗?

谢谢

解决方案

这意味着Highcharts会被加载并且配置被加载,但renderTo选项是错误的,或者页面中没有带该id的div。请参阅www.highcharts.com/errors/13。


I am trying to run the same code in this jsFiddle locally but I got error from firebug

uncaught exception: Highcharts error #13: www.highcharts.com/errors/13

The included script fiels:

<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript" src="http://highcharts.com/js/testing.js"></script>
<script type="text/javascript" src="test.js"></script>  // my js file

same thing happens for this jsFiddle as well.

Anyone know why this happens?

EDIT: I've found the reason for the problem. Actually I have to put the <script type="text/javascript" src="test.js"></script> tag after my <div id="container"></div> tag, otherwise the uncaught exception will be showing even I put the <script> tag in <head>. I never put the script file in the <body> tag before, and this is the first time I met this problem. Can Someone explain me why that happen?

Thanks

解决方案

This means that Highcharts is loaded and the config is loaded, but the renderTo option is wrong, or there is no div with that id in the page. See www.highcharts.com/errors/13.

这篇关于HighCharts未捕获异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-12 04:42