我正在尝试渲染http://demos.dojotoolkit.org/demos/dynamicChart/demo.html。现在我拥有了来自http://demos.dojotoolkit.org/的所有资源,并修复了每个文件中链接的所有路径。它只是不起作用。我把代码放在下面: demo.html -
<link rel="stylesheet" type="text/css" href="demo.css">
<script type="text/javascript" src="/Dojo/dojo-release-1.6.1/dojo/dojo.js" data-dojo-config="isDebug: true,parseOnLoad: true"></script>
<script type="text/javascript" src="src.js"></script>
---
---
---
<select data-dojo-type="dijit.form.ComboBox" id="plot" onChange="changePlot()">
<option value="Columns">Columns</option>
<option value="ClusteredColumns">ClusteredColumns</option>
<option value="StackedColumns">StackedColumns</option>
<option value="Bars">Bars</option>
<option value="ClusteredBars">ClusteredBars</option>
<option value="StackedBars">StackedBars</option>
<option value="Areas">Areas</option>
<option value="StackedAreas">StackedAreas</option>
<option value="Pie">Pie</option>
</select>
demo.profile.js
dependencies = {
layers: [
{
name: "../dynamicChart/src.js",
resourceName: "demos.dynamicChart.src",
dependencies: [
"dynamicChart.src"
]
}
],
prefixes: [
[ "dijit", "/Dojo/dojo-release-1.6.1/dijit" ],
[ "dojox", "/Dojo/dojo-release-1.6.1/dojox" ],
[ "dynamicChart", "../dynamicChart" ]
]
}
demo.css
@import "/Dojo/dojo-release-1.6.1/dojo/resources/dojo.css";
@import "/Dojo/dojo-release-1.6.1/dijit/themes/dijit.css";
@import "/Dojo/dojo-release-1.6.1/dijit/themes/tundra/tundra.css";
.dojoxLegendNode {border: 1px solid #ccc; margin: 5px 10px 5px 10px; padding: 3px}
.dojoxLegendText {vertical-align: text-top; padding-right: 10px}
我不是在放src.js.它没有改变任何东西。 有谁会告诉我我做错了什么?
提前谢谢你。
此致,
南西
答案 0 :(得分:0)
var getData = function(){
var data = new Array(size);
for(var i = 0; i < size; ++i){
data[i] = Math.random() * magnitude;
}
return data;
};