如何在MyEclipse for Spring中使用Dojox图表

时间:2012-03-01 13:23:23

标签: myeclipse dojox.charting

我想显示图表 - 使用this tutorial

这些

<script type="text/javascript">dojo.require("dojox.charting.widget.Chart2D.js");</script>
<script type="text/javascript">dojo.require("dojox.charting.themes.Claro.js");</script>

在Chrome开发者视图中显示为

  

未捕获错误:无法加载&#39; dojox.charting.widget.Chart2D.js&#39 ;;最后一次尝试&#39; ../ dojox / charting / widget / Chart2D / js.js&#39;

在MyEclipse 4 Spring中包含和使用dojox函数的方法是什么?

谷歌已建议将Spring-JS更新到最新版本(因为ME4S版本已经过时且Spring-JS不包含dojox),并且还包括web应用程序根目录中的Jojo librabry,因此资源服务器将找到它。试过这些和其他所有组合无济于事。

我对让Jojo TabContainer工作没有任何问题。它使用了这个:

<script type="text/javascript">dojo.require("dijit.layout.ContentPane");</script>
<script type="text/javascript">dojo.require("dijit.layout.TabContainer");</script>

另外,所有初学者都需要这么长时间才能加快速度吗?

感谢您的帮助。

1 个答案:

答案 0 :(得分:0)

您错误地包含了这些文件;注意你正在使用:

<script type="text/javascript">dojo.require("dojox.charting.widget.Chart2D.js");</script>
<script type="text/javascript">dojo.require("dojox.charting.themes.Claro.js");</script>

应该是:

<script type="text/javascript">dojo.require("dojox.charting.widget.Chart2D");</script>
<script type="text/javascript">dojo.require("dojox.charting.themes.Claro");</script>

基本上,将'.js'从dojo.require中删除。