hada2006 发表于 2015-8-26 10:29:17

FusionCharts的php示例

1、示例1
<?php
$strXML = &quot;&quot;;
$strXML .= &quot;<graph caption='Monthly Unit Sales' xAxisName='Month' yAxisName='Units'
decimalPrecision='0' formatNumberScale='0'>&quot;;
$strXML .= &quot;<set name='Jan' value='462' color='AFD8F8' />&quot;;
$strXML .= &quot;<set name='Feb' value='857' color='F6BD0F' />&quot;;
$strXML .= &quot;</graph>&quot;;
echo renderChartHTML(&quot;../../FusionCharts/FCF_Column3D.swf&quot;, &quot;&quot;, $strXML, &quot;myNext&quot;, 600, 300);
?>
http://docs.fusioncharts.com/charts/contents/guide-for-web-developers/php/PHP_BasicExample.html
http://hi.baidu.com/miracletan2008/item/ecf1778aacd242d05e0ec1a9
http://blog.sina.com.cn/s/blog_813e149b01017rwp.html
http://blog.iyunv.com/daguigto/article/details/4490902
2、示例2
//Initialize <chart> element
$strXML = &quot;<chart caption='Tickets by Issue Types' formatNumberScale='0'>&quot;;
foreach ($issuetype as $issue){
$strXML .= &quot;<set label='&quot; . $issue . &quot;' value='&quot; . $issue . &quot;' />&quot;;
}
//Close <chart> element
$strXML .= &quot;</chart>&quot;;
//Create the chart - Column 2D Chart with data contained in strXML
echo renderChart(&quot;FusionCharts/Charts/FCF_Column2D.swf&quot;, &quot;issueTypes&quot;, $strXML, &quot;&quot;, 600, 300, false, true);
http://stackoverflow.com/questions/3724832/php-creating-an-xml-string-for-fusioncharts-help
3、更多讲解
http://wenku.baidu.com/view/820e213e376baf1ffc4fadcc.html
http://wenku.baidu.com/view/8a52dff6f61fb7360b4c659d.html
页: [1]
查看完整版本: FusionCharts的php示例