欢迎各位兄弟 发布技术文章
这里的技术是共享的
记住 这是 drupal6中的方法
1)安装 views_charts 模块 (它还会要求安装charts_graphs模块(我安装的是charts_graphs-6.x-2.7版本))
2)到views中使用
(Views Charts Provides a "charts" style output for Views module so you can render
result-set not just as text (list, tabular) but as pie-chart, bar-chart,
scatter-plot etc.)
view_charts 发觉会报错Fatal error: Call to a member function set_data() on a non-object inD:\xampputf8\htdocs\wangruo\sites\all\modules\views_charts\views_plugin_style_chart.inc on line 192
/sites/all/modules/views_charts/views_plugin_style_chart.inc 难道这个是显示views内容的地方
所以到 状态报告中 看出什么问题 ,原来是 Charts and Graphs requires at least one charting library enabled. Please go to modules list page and enable at least one charting library.
3)我们先启用 这个模块 amCharts (就是它)
3)然后 我们到 charts_graphs 模块中的 readme.txt文件中查看,需要安装 库文件
我们安装一个amcharts看看 (这里做的操作 本质上是增加flash文件 或者 js文件吧)
到 https://drupal.org/node/681660
https://drupal.org/node/681928 (主要就是这个网站)中看看
下载历史版本 amcharts_flash_1.6.zip
amcolumn.swf, amline.swf, ampie.swf and place them in the "downloaded" folder of the module (directly,
without any folder structure inside the "downloaded" folder).
其实就是放 amcolumn.swf, amline.swf, ampie.swf 到
sites/all/modules/charts_graphs/apis/charts_graphs_amcharts/downloaded
文件夹
4) Download and enable SWFTools
5)
我下载的是 swfobject_2_2.zip
当发现 所有的修改还有错误的时候 把 views的 charts 重新设置一次 竟然好了 ,奇怪