打开 Flash Chart 2 未在 Ruby on Rails 中显示
我的问题是关于我的第一个 Open Flash Chart 根本没有在我的 Rails 应用程序中显示(2.3.5 在 Vista 上运行)。我正在尝试实现:http://openflashchart2.heroku.com/chart_examples/pie。所有代码都在,但是当我使用服务器加载视图时,那里什么也没有!拉出空白页面的源代码,我看到:
swfobject.embedSWF(
"/open-flash-chart.swf","flashcontent_4000",
"650", "300", "9.0.0", "expressInstall.swf",
{"data-file":"/charts_ofc2%2Fpie"}, {{}}, {{}} );
但我没有看到类似的东西(这是从示例页面的源代码复制的):
<object type="application/x-shockwave-flash" wmode="transparent"
data="/open-flash-chart.swf" width="650" height="400"
id="flashcontent_108400" style="visibility: visible; ">
<param name="flashvars" value="data-file=http%3A%2F%2Fopenflashchart2.heroku.com%2Fcharts_ofc2%2Fpie"></object>
我认为缺少这个块是我看不到图表的原因。你知道问题出在哪里吗?太感谢了。
背景
- 设置:在 Windows 上运行的 RoR 2.3.5 机器、现有数据库和 正在开发的项目。
- 在供应商/插件中,我输入: git clone git://github.com/korin/open_flash_chart_2_plugin.git open_flash_chart_2
- 是否 rake open_flash_chart_2:install
- open-flash-chart.swf (265kb) 位于 public/
- swfobject.js 位于 public/javascripts
- json2 位于 public/javascripts/json
- 还进行了 git 克隆并尝试执行子模块 更新但它说:致命:不是 git 存储库(或任何父级存储库) 目录)。
- 将控制器/视图代码复制到新控制器中,
- 饼图Haml 和 JQuery
- 我也将其命名为charts_ofc2,用于安装
My question is about my first Open Flash Chart not displaying at all in my Rails application (2.3.5 running on Vista). I am trying to implement: http://openflashchart2.heroku.com/chart_examples/pie. All the code is in but when I load the view using the server, there's nothing there! Pull up the blank page's source code and I see:
swfobject.embedSWF(
"/open-flash-chart.swf","flashcontent_4000",
"650", "300", "9.0.0", "expressInstall.swf",
{"data-file":"/charts_ofc2%2Fpie"}, {{}}, {{}} );
but I do NOT see anything like this (this is copied from the source code of the example page):
<object type="application/x-shockwave-flash" wmode="transparent"
data="/open-flash-chart.swf" width="650" height="400"
id="flashcontent_108400" style="visibility: visible; ">
<param name="flashvars" value="data-file=http%3A%2F%2Fopenflashchart2.heroku.com%2Fcharts_ofc2%2Fpie"></object>
I think the lack of this chunk is why I'm not seeing the graph. Do you know where the problem is? Thank you so much.
Background
- Setup: RoR 2.3.5 running on a Windows
machine, existing database and
project under development. - In vendor/plugins, I typed: git clone
git://github.com/korin/open_flash_chart_2_plugin.git
open_flash_chart_2 - Did rake open_flash_chart_2:install
- open-flash-chart.swf (265kb) is in public/
- swfobject.js is in public/javascripts
- json2 is in public/javascripts/json
- Also did the git clone and tried to do submodule
update but it said: fatal: not a git
repository (or any of the parent
directories). - Copied controller/view code into new controller
- I also named charts_ofc2 for pie chart
- Haml and JQuery are installed
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论