如何使用PHP导出javascript 2D和区域线图与javascript

时间:2013-03-11 17:40:28

标签: php fusioncharts

以下是我使用的代码

<script type="text/javascript">

                            // this function exports chart from JavaScript
                            function exportChart(exportFormat)
                            {
                                // checks if exportChart function is present and call exportChart function
                                if ( FusionCharts("myChartId3").exportChart )
                                    FusionCharts("myChartId3").exportChart( { "exportFormat" : exportFormat } );
                                else
                                    alert ( "Please wait till the chart completes rendering..." );

                            }


                        </script>
            <input value="Export to JPG" type="button" onClick="JavaScript:exportChart('JPG')" />
                        <input value="Export to PNG" type="button" onClick="JavaScript:exportChart('PNG')" />
                        <input value="Export to PDF" type="button" onClick="JavaScript:exportChart('PDF')" />

<script type="text/javascript">
        var myChart3 = new FusionCharts("FusionCharts/FCF_Line.swf", "myChartId3", "730", "440","0","1"); 
        myChart3.setDataURL("data.php?<?php echo urlencode($url); ?>"); 
       myChart3.render("chartdiv3");    
</script>   

1 个答案:

答案 0 :(得分:0)

FusionCharts Free不支持将图表导出为图像/ PDF。要将图表导出为图像,请使用FusionCharts XT中的SWF文件。

http://www.fusioncharts.com/download/trials/

下载最新版本