本文整理匯總了PHP中FusionCharts::setRenderer方法的典型用法代碼示例。如果您正苦於以下問題:PHP FusionCharts::setRenderer方法的具體用法?PHP FusionCharts::setRenderer怎麽用?PHP FusionCharts::setRenderer使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類FusionCharts
的用法示例。
在下文中一共展示了FusionCharts::setRenderer方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: FusionCharts
<div id="content-area-inner-main">
<h2 class="headline"> Simple Column 3D Chart </h2>
<div class="gen-chart-render">
<CENTER>
<p> </p>
<?php
//This page demonstrates the ease of generating charts using FusionCharts PHPClass.
//For this chart, we've cread a chart object used FusionCharts PHP Class
//supply chart data and configurations to it and render chart using the instance
//Here, we've kept this example very simple.
# Create column 3d chart object
$FC = new FusionCharts("Column3D", "600", "300");
# Set JavaScript renderer
$FC->setRenderer("javascript");
# Set Relative Path of swf file.
$FC->setSWFPath("../../FusionCharts/");
# Define chart attributes
$strParam = "caption=Monthly Unit Sales;xAxisName=Month;yAxisName=Units";
# Set Chart attributes
$FC->setChartParams($strParam);
#add chart data values and category names
$FC->addChartData("462", "Label=Jan");
$FC->addChartData("857", "Label=Feb");
$FC->addChartData("671", "Label=Mar");
$FC->addChartData("494", "Label=Apr");
$FC->addChartData("761", "Label=May");
$FC->addChartData("960", "Label=Jun");
$FC->addChartData("629", "Label=Jul");
$FC->addChartData("622", "Label=Aug");