当前位置: 首页>>代码示例>>PHP>>正文


PHP FusionCharts::setSwfPath方法代码示例

本文整理汇总了PHP中FusionCharts::setSwfPath方法的典型用法代码示例。如果您正苦于以下问题:PHP FusionCharts::setSwfPath方法的具体用法?PHP FusionCharts::setSwfPath怎么用?PHP FusionCharts::setSwfPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FusionCharts的用法示例。


在下文中一共展示了FusionCharts::setSwfPath方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: FusionCharts

<BODY>

<CENTER>
<h2><a href="http://www.fusioncharts.com" target="_blank">FusionCharts Free</a> Examples</h2>
<h4>Simple Column 3D Chart</h4>
<p>&nbsp;</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 Relative Path of swf file.
$FC->setSwfPath("../../FusionCharts/");
# Store Chart attributes in a variable
$strParam = "caption=Monthly Unit Sales;xAxisName=Month;yAxisName=Units;decimalPrecision=0; formatNumberScale=0";
#  Set Chart attributes
$FC->setChartParams($strParam);
#add chart data values and category names
$FC->addChartData("462", "name=Jan");
$FC->addChartData("857", "name=Feb");
$FC->addChartData("671", "name=Mar");
$FC->addChartData("494", "name=Apr");
$FC->addChartData("761", "name=May");
$FC->addChartData("960", "name=Jun");
$FC->addChartData("629", "name=Jul");
$FC->addChartData("622", "name=Aug");
$FC->addChartData("376", "name=Sep");
$FC->addChartData("494", "name=Oct");
开发者ID:laiello,项目名称:ksu,代码行数:30,代码来源:FirstChart.php

示例2: while

            $basic = 0;
            $count = "01";
            while ($count < $total + 1) {
                $arrData[$basic][0] = $count;
                $arrData[$basic][1] = $visitors[$count];
                $count++;
                $basic++;
                if ($count < 10) {
                    $count = "0" . $count;
                }
            }
            $FC = new FusionCharts("Column3D", "800", "300");
            /*
            set Relative Path of chart swf file.
            */
            $FC->setSwfPath("../" . MODS_DIRECTORY . "/charts/");
            /* store chart attributes in a variable. */
            $strParam = "caption={$month} " . _("Statistics") . ";formatNumberScale=0;decimalPrecision=0";
            /* set chart attributes. */
            $FC->setChartParams($strParam);
            $FC->addChartDataFromArray($arrData);
            /* displaying the traffic chart by fetching the data directly from the analytics server. */
            echo "<div>" . $FC->renderChart() . "</div>";
        } else {
            echo "<div class=\"alert alert-error\"><strong>" . _("Settings not configured.") . "</strong><br/>" . _("It seems that your Google analytics settings are not configured properly. Please configure them properly.") . "</div>";
        }
    } else {
        echo "<div class=\"alert alert-error\"><strong>" . _("Unauthorized Access.") . "</strong><br/>" . _("You are not authorized to access this page.") . "</div>";
    }
} else {
    echo "<meta http-equiv=\"refresh\" content=\"0;url={$website}/" . USER_DIRECTORY . "/login\" />";
开发者ID:Abysmal,项目名称:AuthManager,代码行数:31,代码来源:statistics.php

示例3: FusionCharts

<?php

/**
 * Created by PhpStorm.
 * User: Allan Wiz
 * Date: 4/17/15
 * Time: 4:48 PM
 */
include '../classes/aardb_conn.php';
include '../charts/JSClass/FusionCharts_Gen.php';
global $session, $database;
global $conn;
$FC = new FusionCharts("FC_Line.swf", "900", "450");
$FC->setDataBaseType("Oracle");
$FC->setSwfPath("../Charts/");
$strParam = "caption=INTEREST VIEW REPORT (for the last 14 days);subCaption=BY APPLICABLE DATE ; showNames='1';pieSliceDepth=30;showBorder=1;numberSuffix= %; formatNumberScale='0'; xAxisName=Date; pYAxisName=Net Asset Value;sYAxisName=BalancedFund";
$FC->setChartParams($strParam);
$start = date("d/M/Y", strtotime('-50 days'));
$today = date("d/M/Y");
$sql = "SELECT I_RATES.RATE_ID, I_RATES.RATE_DATE AS DATEY, I_RATES.RATE AS RATE, SECURITIES.DESCRIPT AS DESCRIPTION FROM I_RATES INNER JOIN\r        SECURITIES ON I_RATES.SECURITY_CODE = SECURITIES.SECURITY_CODE WHERE I_RATES.CONFIRMD = 1 AND I_RATES.RATE_DATE  BETWEEN '{$start}' AND '{$today}' ORDER BY I_RATES.RATE_DATE";
$result = oci_parse($conn, $sql) or die("");
oci_execute($result);
if ($result) {
    //$FC->addCategoryFromDatabase($result,"DESCRIPTION");
    $FC->addDataFromDatabase($result, "RATE", "DATEY");
}
print $FC->getXML();
开发者ID:Kemallyson,项目名称:Wizglobal,代码行数:27,代码来源:int_view_chart.php

示例4: sum

         $strQuery = "select sum(clicks) as TotOutput from kw_log where timestamp BETWEEN {$i} AND {$end}";
         $result2 = mysql_query($strQuery) or die(mysql_error());
         $ors2 = mysql_fetch_array($result2);
         $FC->addChartData($ors2['TotOutput'], "name=" . date("d/m/y", $i));
         mysql_free_result($result2);
     }
     mysql_close($dbh);
     $FC->renderChart();
 }
 // end if type is clicks
 if ($type == "rep") {
     $categories = array("Revenue", "Expense");
     $revenue = array();
     $expense = array();
     $FC = new FusionCharts("MSColumn3D", "800", "400");
     $FC->setSwfPath("graphs/FusionCharts/");
     $strParam = "caption=Revenue/Expense/Profit;xAxisName=Date/Time;yAxisName=\$;decimalPrecision=2; formatNumberScale=\$0.00; rotateNames=1";
     $FC->setChartParams($strParam);
     for ($i = $start_time; $i <= $end_time; $i += 86400) {
         $FC->addCategory(date("d/m/Y", $i));
     }
     foreach ($categories as $cat) {
         $FC->addDataset($cat);
         if ($cat == "Revenue") {
             $field_name = "revenue";
         } elseif ($cat == "Expense") {
             $field_name = "cost";
         }
         $dbh = mysql_connect($db_location, $username, $password);
         // or die ('I cannot connect to the database because: ' . mysql_error());
         mysql_select_db($database);
开发者ID:jprecht,项目名称:ppc-coach-tracker,代码行数:31,代码来源:graphs-guts.php


注:本文中的FusionCharts::setSwfPath方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。