|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /home/queenjbs/www/FusionChart/Code/PHPClass/StarterSamples/RenderAsHTML/ |
Upload File : |
<?php
# Include FusionCharts PHP Class
include("../Class/FusionCharts_Gen.php");
# Create Column3D chart Object
$FC = new FusionCharts("Column3D","300","250");
# set the relative path of the swf file
$FC->setSWFPath("../FusionCharts/");
# Define chart attributes
$strParam="caption=Weekly Sales;xAxisName=Week;yAxisName=Revenue;numberPrefix=$";
# Set chart attributes
$FC->setChartParams($strParam);
# Add chart values and category names
$FC->addChartData("40800","label=Week 1");
$FC->addChartData("31400","label=Week 2");
$FC->addChartData("26700","label=Week 3");
$FC->addChartData("54400","label=Week 4");
?>
<html>
<head>
<title>Render as HTML Using FusionCharts PHP Class</title>
</head>
<body>
<?php
# Pass true to renderChart() function
# to use HTML Embedding Method.
# This is helpful if you wish not use FusionCharts.js
# or when rendering the chart using AJAX
$FC->renderChart(true);
?>
</body>
</html>