0

我正在尝试使用我在程序中创建的二维数组(我需要......)绘制条形图(Raphael.js),而不是传递实际值但没有输出得到空白屏幕。猜测 g.bar.js 无法解析数组,而我拥有的 g.bar.js 来自 g.raphael.com。我也尝试过来自https://github.com/vezult/g.raphael/blob/8a2b7dc3f97ddf5196791fa9eaa8640350d161a/g.bar.js的 g.bar.js,但我什至无法编译这个东西。条形图调用 r.barchart(5, 10, 300, 220, data, {stacked: true, type: "round"}).hoverColumn(fin2, fout2); data 是一个二维数组 有经验的请联系。谢谢。

4

1 回答 1

0

I'm still confused of your "compilation errors" because JS is interpretable not compilable script language.

<script type="text/javascript" src="raphael.js"></script>
<script type="text/javascript" src="g.raphael.js"></script>
<script type="text/javascript" src="g.bar.js"></script>

Linking scripts in this order will not raise any error even with alternated g.bar.js. I've tested it.

于 2013-01-09T19:09:52.013 回答