我最近下载打开Flash图表源代码,我已经intergrated到我的Zend MVC.Since我用的是自动加载磁带机 我已经改名为我的文件,并评论了“require_once”源代码行。

然而,当我尝试加载我的图表

<script type="text/javascript">
    swfobject.embedSWF(
        "<?php echo $this->baseUrl() ?>/swf/open-flash-chart.swf", 
        "my_chart", "550", "200",
        "9.0.0", 
        "<?php echo $this->baseUrl() ?>/swf/expressInstall.swf",
        {"data-file":"<?php echo $this->baseUrl()?>/reportexpense/piechart/"}
    );
    </script>

它加载"/data-files/y-axis-auto-steps.txt"代替和我不能找出原因。

我控制器返回JSON字符串我希望被渲染。 我缺少什么?

有帮助吗?

解决方案

只是为了助阵那些谁可能会遇到同样的问题。 我调整代码来读取

<script type="text/javascript">  

 swfobject.embedSWF(
            "<?php echo $this->baseUrl() ?>/swf/open-flash-chart.swf", 
            "my_chart", "550", "200",
            "9.0.0", 
            "<?php echo $this->baseUrl() ?>/swf/expressInstall.swf",
            {"get-data":"get_data_1"}
        );

 function ofc_ready()
 {
     //alert('ofc_ready');       
 }

 function get_data_1()
 {      
     return JSON.stringify(<?php echo $this->myreport?>);        
 }

</script>

它完美地工作。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top