0

有没有人找到将 OpenFlashChart v2 与 CodeIgniter 集成的方法?问题是作者将类中的所有内容和多个文件分开。这会阻止您为 CodeIgniter 创建帮助程序或插件。可以在此处找到使用 2 之前版本的一种方法。不过,我还没有找到使用图表第 2 版的方法。有没有其他人找到方法?提前致谢!

4

1 回答 1

1

对于版本 2,您只需要生成一个像这样的 javascript json

<script type='text/javascript'>
                    var data =  {"title":{"text":""},"is_decimal_separator_comma":0,"elements":[{"values":[{"value":25000,"label":"AIG Australia 41.67%","highlight":"alpha"},{"value":35000,"label":"Valentino Jr. 58.33%","highlight":"alpha"}],"alpha":0.8,"type":"pie","start-angle":21,"tip":"#val# - #percent#","colours":["#F09B0A","#F03060","#E6FF29","#805B37","#13613A","#aacc44"]}],"num_decimals":2,"is_fixed_num_decimals_forced":0,"is_thousand_separator_disabled":0};
                    $(document).ready(function(){
                        swfobject.embedSWF("/flash/open-flash-chart.swf", "echart", "600","400","9.0.0");
                    });
                    function open_flash_chart_data()
                    {
                            ex = JSON.stringify(data);
                            return ex;
                    }
                </script>

我为此使用 Grails,但我认为它与 codeigniter 相同 :)

于 2009-06-25T05:27:21.647 回答