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


PHP FusionCharts::addChartData方法代码示例

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


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

示例1: makeBar

 function makeBar($val, $IDSuffix)
 {
     //---------- Creating First Chart ----------------------------------------------
     # Create FusionCharts PHP object
     $FC = new FusionCharts("Column3D", "300", "250", "myChartId" . $IDSuffix);
     # set the relative path of the swf file
     $FC->setSWFPath("../../FusionCharts/");
     # Define chart attributes#  Set chart attributes
     $strParam = "caption=Weekly Sales;subcaption={$val};xAxisName=Week;yAxisName=Revenue;numberPrefix=\$";
     # Setting chart attributes
     $FC->setChartParams($strParam);
     # add chart values and category names for the First Chart
     $FC->addChartData("40800", "Label=Week 1");
     $FC->addChartData("31400", "Label=Week 2");
     $FC->addChartData("26700", "Label=Week 3");
     $FC->addChartData("54400", "Label=Week 4");
     //-------------------------------------------------------------------
     $FC->renderChart();
 }
开发者ID:tyxing007,项目名称:pet-service,代码行数:19,代码来源:ed.php

示例2:

$FC->setChartParams($strParam);
# Add Category, 1st parameter take label and 2nd parameter takes x axis value
# as parameter list
$FC->addCategory("0", "x=0;showVerticalLine=1");
$FC->addCategory("20", "x=20;showVerticalLine=1");
$FC->addCategory("40", "x=40;showVerticalLine=1");
$FC->addCategory("60", "x=60;showVerticalLine=1");
$FC->addCategory("80", "x=80;showVerticalLine=1");
$FC->addCategory("100", "x=100;showVerticalLine=1");
# Add a new dataset
$FC->addDataSet("Previous Month");
# Add chart data for the above dataset
# where 1st parameter for X axis value
# 2nd parameter take Y and Z axis as parameter list
# e.g y=12200;z=10
$FC->addChartData("20", "y=72000;z=8");
$FC->addChartData("43", "y=42000;z=5");
$FC->addChartData("70", "y=90000;z=2");
$FC->addChartData("90", "y=75000;z=4");
# Add another dataset
$FC->addDataSet("Current Month");
# Add chart data for the above dataset
# where 1st parameter for X axis value
# 2nd parameter take Y and Z axis as parameter list
# e.g y=12200;z=10
$FC->addChartData("18", "y=22000;z=3");
$FC->addChartData("35", "y=62000;z=5");
$FC->addChartData("50", "y=55000;z=10");
$FC->addChartData("70", "y=25000;z=3");
?>
<html>
开发者ID:tyxing007,项目名称:pet-service,代码行数:31,代码来源:BubbleChart.php

示例3: FusionCharts

include '../Class/FusionCharts_Gen.php';
# Create SSGrid chart Object
$FC = new FusionCharts("grid", "300", "200");
# set the relative path of the swf file
$FC->setSWFPath("../FusionCharts/");
# Set grid value Percent on
$FC->setGridParams("showPercentValues=1");
# Set alternet row back ground color
$FC->setGridParams("alternateRowBgColor=EAECEF");
# number item per page
$FC->setGridParams("numberItemsPerPage=4");
# set grid font and font size
$FC->setGridParams("baseFont=vardana");
$FC->setGridParams("baseFontSize=12");
# Add grid 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");
$FC->addChartData("88544", "label=Week 5");
$FC->addChartData("22544", "label=Week 6");
$FC->addChartData("65548", "label=Week 7");
?>
<html>
  <head>
    <title>SSGrid with PHP Class</title>
    <script language='javascript' src='../FusionCharts/FusionCharts.js'></script>
  </head>
  <body>

  <?php 
开发者ID:tyxing007,项目名称:pet-service,代码行数:31,代码来源:ssgrid.php

示例4: FusionCharts

$FC = new FusionCharts("MSColumn3DLineDY", "450", "350");
# Set the relative path of the swf file
$FC->setSWFPath("../FusionCharts/");
# Store chart attributes in a variable
$strParam = "caption=Weekly Sales;subcaption=Comparison;xAxisName=Week;pYAxisName=Revenue;sYAxisName=Total Quantity;numberPrefix=\$;sNumberSuffix= U";
# Set chart attributes
$FC->setChartParams($strParam);
# Add category names
$FC->addCategory("Week 1");
$FC->addCategory("Week 2");
$FC->addCategory("Week 3");
$FC->addCategory("Week 4");
# Add a new dataset with dataset parameters
$FC->addDataset("This Month", "showValues=0");
# Add chart data for the above dataset
$FC->addChartData("40800");
$FC->addChartData("31400");
$FC->addChartData("26700");
$FC->addChartData("54400");
# Add aother dataset with dataset parameters
$FC->addDataset("Previous Month", "showValues=0");
# Add chart data for the second dataset
$FC->addChartData("38300");
$FC->addChartData("28400");
$FC->addChartData("15700");
$FC->addChartData("48100");
# Add third dataset for the secondary axis
$FC->addDataset("Total Quantity", "parentYAxis=S");
# Add secondary axix's data values
$FC->addChartData("64");
$FC->addChartData("70");
开发者ID:bamcod,项目名称:Disease-Surveillance,代码行数:31,代码来源:CombinationChart.php

示例5: FusionCharts

 function confirm_complete()
 {
     $FC = new FusionCharts();
     $totalGigs = $this->consultants->confirmGigs();
     $gigsByMonth = array();
     foreach ($totalGigs as $tg) {
         $marr = explode("-", $tg->eventDate);
         $gigsByMonth[$marr[1]][] = $tg;
     }
     $monthsArr = array("1" => "Jan", "2" => "Feb", "3" => "Mar", "4" => "Apr", "5" => "May", "6" => "Jun", "7" => "Jul", "8" => "Aug", "9" => "Sep", "10" => "Oct", "11" => "Nov", "12" => "Dec");
     // specify the graph parameters
     $strParam = "caption=Total Gigs- Monthly ;xAxisName=Month;yAxisName=Total gigs;decimalPrecision=0;formatNumberScale=1";
     $FC->setChartParams($strParam);
     for ($i = 1; $i <= 12; $i++) {
         $total = isset($gigsByMonth[$i]) ? count($gigsByMonth[$i]) : 0;
         $FC->addChartData($total, "name=" . $monthsArr[$i]);
     }
     print $FC->getXML();
 }
开发者ID:benoastler,项目名称:Clubband,代码行数:19,代码来源:charts.php

示例6: FusionCharts

<?php

# Include FusionCharts PHP Class
include "../Class/FusionCharts_Gen.php";
# Create Column2D chart Object
$FC = new FusionCharts("column2D", "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");
# Add First TrendLine
$FC->addTrendLine("startValue=42000;color=ff0000");
# Add Second TrendLine
$FC->addTrendLine("startValue=30000;color=008800;displayvalue=Average;showOnTop=1");
# Add  TrendZone
$FC->addTrendLine("startValue=50000;endValue=60000;color=0000ff;alpha=20;displayvalue=Dream Sales;showOnTop=1;isTrendZone=1");
?>
<html>
  <head>
    <title>First Chart - Advanced - Add Trendlines : Using FusionCharts PHP Class</title>
    <script language='javascript' src='../FusionCharts/FusionCharts.js'></script>
  </head>
  <body>
开发者ID:bamcod,项目名称:Disease-Surveillance,代码行数:30,代码来源:FirstChart_Trendlines.php

示例7: FusionCharts

# add chart values and category names for the First Chart
$FC->addChartData("40800", "name=Week 1");
$FC->addChartData("31400", "name=Week 2");
$FC->addChartData("26700", "name=Week 3");
$FC->addChartData("54400", "name=Week 4");
//-------------------------------------------------------------------
//----- Creating Second Chart ---------------------------------------
# Create FusionCharts PHP object
$FC2 = new FusionCharts("Column3D", "300", "250");
# set the relative path of the swf file
$FC2->setSWFPath("../../FusionCharts/");
#  Setting chart attributes
$strParam = "caption=Weekly Sales;subcaption=Quantity;xAxisName=Week;yAxisName=Quantity;decimalPrecision=0";
$FC2->setChartParams($strParam);
# add chart values and  category names for the second chart
$FC2->addChartData("32", "name=Week 1");
$FC2->addChartData("35", "name=Week 2");
$FC2->addChartData("26", "name=Week 3");
$FC2->addChartData("44", "name=Week 4");
//-------------------------------------------------------------------------
# Render First Chart
$FC->renderChart();
# Render Second Chart
$FC2->renderChart();
?>

<BR><BR>
<a href='../NoChart.html' target="_blank">Unable to see the charts above?</a>
<H5 ><a href='../default.htm'>&laquo; Back to list of examples</a></h5>
</CENTER>
</BODY>
开发者ID:laiello,项目名称:ksu,代码行数:31,代码来源:MultiChart.php

示例8: FusionCharts

<?php

# Include FusionCharts PHP Class
include "../Class/FusionCharts_Gen.php";
# Create Column 2D chart Object
$FC = new FusionCharts("Column2D", "450", "350");
# set the relative path of the swf file
$FC->setSWFPath("../FusionCharts/");
# Set colon (:) as delimiter
$FC->setParamDelimiter(":");
# 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:alpha=80");
$FC->addChartData("31400", "label=Week 2:alpha=60");
$FC->addChartData("26700", "label=Week 3");
$FC->addChartData("54400", "label=Week 4");
# Set hash (#) as delimiter
$FC->setParamDelimiter("#");
# Add TrendLine
$FC->addTrendLine("startValue=42000#color=ff0000#displayvalue=Target#showOnTop=1");
# Set semicolon (;) as delimiter
$FC->setParamDelimiter(";");
# Add TrendLine
$FC->addTrendLine("startValue=30000;color=008800;displayvalue=Average;showOnTop=1");
?>
<html>
  <head>
    <title>First Chart - Set Delimiter : Using FusionCharts PHP Class</title>
开发者ID:tyxing007,项目名称:pet-service,代码行数:31,代码来源:FirstChart_Delim.php

示例9: sendStatusAction

 public function sendStatusAction()
 {
     $oPermission = new Config_Permission();
     $oApp = new Config_App();
     $oServer = new Config_Server();
     $oPartnerApp = new Config_Partner_App();
     $oPartner = new Config_Partner();
     $oArea = new Config_Area();
     //获取用户可以查看的游戏列表
     $permitted_app = $oPermission->getApp($this->manager->data_groups, 'AppId,name');
     //预处理地区信息
     $AreaList = $oArea->getAll();
     //检查当前页面权限
     $sign = '?ctl=config/socket.queue&ac=send.status';
     $this->manager->checkMenuPermission($sign, Widget_Manager::MENU_PURVIEW_SELECT);
     $SocketType = $this->oSocketType->getAll();
     //页面输入变量
     $AppId = intval($this->request->AppId);
     $PartnerId = intval($this->request->PartnerId);
     $ServerId = intval($this->request->ServerId);
     $AreaId = intval($this->request->AreaId) ? intval($this->request->AreaId) : 0;
     $app_type = intval($this->request->app_type);
     $partner_type = intval($this->request->partner_type);
     $is_abroad = intval($this->request->is_abroad) ? intval($this->request->is_abroad) : 0;
     $uType = intval($this->request->uType) ? intval($this->request->uType) : 0;
     //时间范围初始化
     $Date = $this->request->Date ? $this->request->Date : date("Y-m-d", time());
     //初始化图表配置
     $divideV = 23;
     $Step = 60;
     //初始化合作商列表
     $permitted_partner = array();
     //初始化服务器列表
     $permitted_server = array();
     //获取当前地区列表
     $AreaList = $oArea->getAbroad($is_abroad, $AreaList);
     //生成允许的地区id数组
     if ($app_type > 0) {
         //筛选是否平台产品
         $permitted_app = $oApp->getApp($app_type, $permitted_app);
     }
     if ($AppId > 0) {
         //获取可查看的权限总表
         $permitted_partner = $oPermission->getPartner($this->manager->data_groups, $AppId, 'PartnerId,name,AreaId');
         //根据合作方式筛选
         $permitted_partner = $oPartnerApp->getPermittedPartnerByPartnerType($partner_type, $permitted_partner);
         //根据所在地区筛选
         $permitted_partner = $oPartnerApp->getPermittedPartnerByPartnerArea($AreaList, $permitted_partner);
         if ($PartnerId > 0) {
             //获取服务器列表
             $permitted_server = $oPermission->getServer($this->manager->data_groups, $AppId, $PartnerId, 'ServerId,name');
         }
     }
     //获取用于查询的权限sql语句
     $SendStatusArr = $this->oSocketQueue->getSendStatus($Date, $ServerId, $uType);
     for ($i = 0; $i < 24 * 60; $i++) {
         $H = intval($i / 60);
         $m = $i - $H * 60;
         if (!isset($SendStatusArr[$i])) {
             $SendStatusArr[$i] = array('Time' => sprintf("%02d", $H) . ":" . sprintf("%02d", $m), 'SendCount' => 0);
         } else {
             $SendStatusArr[$i]['Time'] = sprintf('%02d', $H) . ":" . sprintf('%02d', $m);
         }
     }
     ksort($SendStatusArr);
     # Include FusionCharts PHP Class
     include 'Third/fusion/Includes/FusionCharts_Gen.php';
     # Create Multiseries ColumnD chart object using FusionCharts PHP Class
     $FC = new FusionCharts("MsLine", '100%', '500');
     # Set the relative path of the swf file
     $FC->setSWFPath("../Charts/");
     # Store chart attributes in a variable
     $strParam = "caption='Socket队列发送情况';animation=0;xAxisName='时间';baseFontSize=12;numberPrefix=;decimalPrecision=0;showValues=0;formatNumberScale=0;labelStep={$Step};numvdivlines={$divideV};rotateNames=1;yAxisMinValue=0;yAxisMaxValue=10;numDivLines=9;showAlternateHGridColor=1;alternateHGridAlpha=5;alternateHGridColor='CC3300'";
     # Set chart attributes
     $FC->setChartParams($strParam);
     foreach ($SendStatusArr as $key => $data) {
         $FC->addCategory($data['Time']);
     }
     $FC->addDataset("发送数量");
     foreach ($SendStatusArr as $key => $data) {
         $FC->addChartData($data['SendCount']);
     }
     $page_title = "Socket队列发送情况";
     $page_form_action = $sign;
     //调取模板
     include $this->tpl('Config_SocketQueue_SendStatus');
 }
开发者ID:eappl,项目名称:prototype,代码行数:87,代码来源:SocketQueueController.php

示例10: fs_3d_column_chart

function fs_3d_column_chart($data, $width, $height)
{
    if (sizeof($data) == 0) {
        return;
    }
    // Generate the XML
    $chart = new FusionCharts('Column2D', $width, $height);
    $empty = 0;
    $num_vlines = 0;
    $count = 0;
    $step = 3;
    foreach ($data as $name => $value) {
        if ($count++ % $step == 0) {
            $show_name = '1';
            $num_vlines++;
        } else {
            $show_name = '0';
        }
        if ($value > 0) {
            $empty = 0;
        }
        $chart->addChartData($value, 'name=' . clean_flash_string($name) . ';showName=' . $show_name . ';color=95BB04');
    }
    $chart->setChartParams('decimalPrecision=0;showAlternateVGridColor=1; numVDivLines=' . $num_vlines . ';showNames=1;rotateNames=1;showValues=0;showPercentageValues=0;showLimits=0;baseFontSize=9;' . ($empty == 1 ? ';yAxisMinValue=0;yAxisMaxValue=1' : ''));
    // Return the code
    return get_chart_code($chart, $width, $height, 'include/graphs/FusionCharts/FCF_Column2D.swf');
}
开发者ID:articaST,项目名称:integriaims,代码行数:27,代码来源:functions_fsgraph.php

示例11: COUNT

    $chart_traffic = mysql_fetch_row($chart_traffic);
    $chart_traffic = $chart_traffic[0];
    $chart_approved = mysql_query("select COUNT(*) from idevaff_sales where approved = '1' and bonus = '0' and id = '{$linkidforcharts}'");
    $chart_approved = mysql_fetch_row($chart_approved);
    $chart_approved = $chart_approved[0];
    $chart_paid = mysql_query("select COUNT(*) from idevaff_archive where bonus = '0' and id = '{$linkidforcharts}'");
    $chart_paid = mysql_fetch_row($chart_paid);
    $chart_paid = $chart_paid[0];
    $chart_commissions = $chart_approved + $chart_paid;
    $chart_traffic_tag = "Unique Hits";
    $chart_commissions_tag = "Total Sales";
    $FC = new FusionCharts("Column2D", "280", "180");
    $FC->setSWFPath("templates/fusion/FusionCharts/");
    $strParam = "showDivLineValue=0;canvasBorderColor=FFFFFF;formatNumberScale=0;formatNumber=1;animation=1;decimalPrecision=0;canvasBorderThickness=0;canvasBgColor=FFFFFF;canvasBaseColor=5c5c5c;canvasBaseDepth=1;baseFont=arial;baseFontSize=11;outCnvBaseFont=arial;outCnvBaseFontSze=11;showLegend=1";
    $FC->setChartParams($strParam);
    $FC->addChartData($chart_traffic, "name={$chart_traffic_tag}");
    $FC->addChartData($chart_commissions, "name={$chart_commissions_tag}");
    $FC->renderChart();
}
?>
</td>
</tr>
<tr>
<td width="30%" bgcolor="<?php 
echo $this->_tpl_vars['white_back'];
?>
">&nbsp;<?php 
echo $this->_tpl_vars['general_transactions'];
?>
</td>
<td width="25%" bgcolor="<?php 
开发者ID:ashfaqphplhr,项目名称:artificiallawnsforturf,代码行数:31,代码来源:%%CE^CE3^CE3E7A3F%%file%3Aaccount_general_stats.tpl.php

示例12: FusionCharts

$intBeverages = $_REQUEST['Beverages'];
$intDesserts = $_REQUEST['Desserts'];
//In this example, we're directly showing this data back on chart.
//In your apps, you can do the required processing and then show the
//relevant data only.
//Now that we've the data in variables, we need to convert this into chart data using
//FusionCharts PHP Class
# Create Pie 3d chart object
$FC = new FusionCharts("Pie3D", "600", "300");
# Set Relative Path of swf file.
$FC->setSwfPath("../../FusionCharts/");
//Store Chart attributes in a variable
$strParam = "caption=Sales by Product Category;subCaption=For this week;showPercentValues=1;  showPercentageInLabel=1;pieSliceDepth=25;showBorder=1;decimalPrecision=0;showNames=1";
#  Set chart attributes
$FC->setChartParams($strParam);
//Add all data
$FC->addChartData($intSoups, "name=Soups");
$FC->addChartData($intSalads, "name=Salads");
$FC->addChartData($intSandwiches, "name=Sandwitches");
$FC->addChartData($intBeverages, "name=Beverages");
$FC->addChartData($intDesserts, "name=Desserts");
//Create the chart
$FC->renderChart();
?>
<a href='javascript:history.go(-1);'>Enter data again</a>
<BR><BR>
<a href='../NoChart.html' target="_blank">Unable to see the chart above?</a>
<H5 ><a href='../default.htm'>&laquo; Back to list of examples</a></h5>
</CENTER>
</BODY>
</HTML>
开发者ID:farzam65,项目名称:YetiShare-File-Hosting-Script-Free,代码行数:31,代码来源:Chart.php

示例13: onrevokeComplainData

 function onrevokeComplainData()
 {
     //只查询转为投诉的问题
     $ConditionList['transformed'] = 1;
     $action = "index.php?admin_complain/revokeComplainData";
     $hasIntoComplainViewPrivilege = $_ENV['menu']->checkPermission($this->ask_login_name, $_SERVER['QUERY_STRING'], "intoRevokeComplainData");
     $hasIntoComplainViewPrivilege['url'] = "?admin_main";
     !$hasIntoComplainViewPrivilege['return'] && __msg($hasIntoComplainViewPrivilege);
     $ConditionList['ComplainStartDate'] = isset($this->post['ComplainStartDate']) ? $this->post['ComplainStartDate'] : (isset($this->get[2]) ? $this->get[2] : date("Y-m-d", time() - 7 * 86400));
     $ConditionList['ComplainEndDate'] = isset($this->post['ComplainEndDate']) ? $this->post['ComplainEndDate'] : (isset($this->get[3]) ? $this->get[3] : date("Y-m-d", time()));
     $ConditionList['author'] = isset($this->post['author']) ? urldecode(trim($this->post['author'])) : (isset($this->get[4]) ? urldecode(trim($this->get[4])) : "");
     $ConditionList['author_id'] = isset($this->post['author_id']) ? trim($this->post['author_id']) : (isset($this->get[5]) ? trim($this->get[5]) : "");
     $ConditionList['operator_loginId'] = isset($this->post['operator_loginId']) ? trim($this->post['operator_loginId']) : (isset($this->get[6]) ? trim($this->get[6]) : "");
     $ConditionList['jid'] = isset($this->post['jid']) ? intval($this->post['jid']) : (isset($this->get[7]) ? intval($this->get[7]) : 0);
     $SellerTypeList = $this->ask_config->getSellerType();
     $ConditionList['sid'] = isset($this->post['sid']) ? intval($this->post['sid']) : (isset($this->get[8]) ? intval($this->get[8]) : -1);
     $J = $this->cache->get("Jlist_" . $ConditionList['sid']);
     if (false !== $J) {
         $Jlist = json_decode($J, true);
     } else {
         $Jlist = $_ENV['complain']->getJList($ConditionList['sid']);
         $this->cache->set("Jlist_" . $ConditionList['sid'], json_encode($Jlist), 1800);
     }
     $ConditionList['status'] = 2;
     $ConditionList['Assess'] = -1;
     $ConditionList['reason'] = isset($this->post['reason']) ? urldecode(trim($this->post['reason'])) : (isset($this->get[9]) ? urldecode(trim($this->get[9])) : "");
     $export = trim($this->get[10]) == "export" ? 1 : 0;
     $pagesize = $this->setting['list_default'];
     $pagesize = 20;
     $complainData = $_ENV['complain']->getRevokeComplainData($ConditionList);
     $downloadstr = page_url("<下载EXCEL表格>", "admin_complain/revokeComplainData/" . $ConditionList['ComplainStartDate'] . "/" . $ConditionList['ComplainEndDate'] . "/" . urlencode($ConditionList['author']) . "/" . $ConditionList['author_id'] . "/" . $ConditionList['operator_loginId'] . "/" . $ConditionList['jid'] . "/" . $ConditionList['sid'] . "/" . $ConditionList['reason'] . "/export");
     if (!$export) {
         $msg && ($message = $msg);
         $ty && ($type = $ty);
         # Include FusionCharts PHP Class
         include TIPASK_ROOT . '/lib/fusion/Includes/FusionCharts_Gen.php';
         $FC2 = new FusionCharts("Pie2d", '100%', '400');
         $FC2->setSWFPath('../Charts/');
         $strParam = "caption='撤销理由统计';xAxisName='理由';baseFontSize=12;numberPrefix=;numberSuffix=次;decimalPrecision=0;showValues=1;formatNumberScale=0;rotateNames=0;numDivLines=9;showAlternateHGridColor=1;alternateHGridAlpha=5;alternateHGridColor='CC3300';hoverCapSepChar=,";
         $FC2->setChartParams($strParam);
         $FC2->addDataset("撤销理由");
         foreach ($complainData['RevokeReasonList'] as $r => $data) {
             $complainData['RevokeReasonList'][$r]['rate'] = $complainData['totalData']['complainCount'] > 0 ? $data['revokeCount'] / $complainData['totalData']['complainCount'] : 0;
             $FC2->addChartData($data['revokeCount'], 'name="' . $data['content'] . '"');
         }
         $FC3 = new FusionCharts("Pie2d", '100%', '400');
         $FC3->setSWFPath('../Charts/');
         $strParam = "caption='交易类型统计';xAxisName='交易类型';baseFontSize=12;numberPrefix=;numberSuffix=次;decimalPrecision=0;showValues=1;formatNumberScale=0;rotateNames=0;numDivLines=9;showAlternateHGridColor=1;alternateHGridAlpha=5;alternateHGridColor='CC3300';hoverCapSepChar=,";
         $FC3->setChartParams($strParam);
         $FC3->addDataset("交易类型");
         $jlist = $_ENV['complain']->getJList(0);
         unset($jlist[0]);
         foreach ($complainData['jList'] as $j => $data) {
             $complainData['jList'][$j]['jName'] = isset($jlist[$j]) ? $jlist[$j] : "未定义交易类型" . $j;
             $complainData['jList'][$j]['rate'] = $complainData['totalData']['complainCount'] > 0 ? $data['revokeCount'] / $complainData['totalData']['complainCount'] : 0;
             $FC3->addChartData($data['revokeCount'], "name=" . $complainData['jList'][$j]['jName']);
         }
         $FC4 = new FusionCharts("Pie2d", '100%', '400');
         $FC4->setSWFPath('../Charts/');
         $strParam = "caption='用户身份类型统计';xAxisName='身份类型';baseFontSize=12;numberPrefix=;numberSuffix=次;decimalPrecision=0;showValues=1;formatNumberScale=0;rotateNames=0;numDivLines=9;showAlternateHGridColor=1;alternateHGridAlpha=5;alternateHGridColor='CC3300';hoverCapSepChar=,";
         $FC4->setChartParams($strParam);
         $FC4->addDataset("身份类型");
         $SellerTypeList = $this->ask_config->getSellerType();
         unset($slist[0]);
         foreach ($complainData['sList'] as $s => $data) {
             $complainData['sList'][$s]['sName'] = isset($SellerTypeList[$s]) ? $SellerTypeList[$s] : "未定义身份类型" . $s;
             $complainData['sList'][$s]['rate'] = $complainData['totalData']['complainCount'] > 0 ? $data['revokeCount'] / $complainData['totalData']['complainCount'] : 0;
             $FC4->addChartData($data['revokeCount'], "name=" . $complainData['sList'][$s]['sName']);
         }
     } else {
         set_time_limit(0);
         require TIPASK_ROOT . '/lib/Excel.php';
         $oExcel = new Excel();
         $FileName = '已撤销投诉统计下载';
         $oExcel->download($FileName);
         $oExcel->addSheet('撤销理由统计');
         //标题栏
         $title = array("撤销理由", "撤销次数", "问题占比");
         $oExcel->addRows(array($title));
         foreach ($complainData['RevokeReasonList'] as $r => $data) {
             $excelArr = array();
             $excelArr = array("reason" => $data['content'], "revokeCount" => $data['revokeCount'], "rate" => $complainData['totalData']['complainCount'] > 0 ? $data['revokeCount'] / $complainData['totalData']['complainCount'] : 0);
             $oExcel->addRows(array($excelArr));
         }
         $oExcel->closeSheet();
         $oExcel->addSheet('交易类型统计');
         //标题栏
         $title = array("交易类型", "撤销次数", "问题占比");
         $oExcel->addRows(array($title));
         $jlist = $_ENV['complain']->getJList(0);
         unset($jlist[0]);
         foreach ($complainData['jList'] as $j => $data) {
             $excelArr = array();
             $excelArr = array("jname" => isset($jlist[$j]) ? $jlist[$j] : "未定义交易类型" . $j, "revokeCount" => $data['revokeCount'], "rate" => $complainData['totalData']['complainCount'] > 0 ? $data['revokeCount'] / $complainData['totalData']['complainCount'] : 0);
             $oExcel->addRows(array($excelArr));
         }
         $oExcel->closeSheet();
         $oExcel->addSheet('身份类型统计');
         //标题栏
         $title = array("身份类型", "撤销次数", "问题占比");
//.........这里部分代码省略.........
开发者ID:eappl,项目名称:prototype,代码行数:101,代码来源:complain.php

示例14: elseif

     $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);
     $num = 0;
     for ($i = $start_time; $i <= $end_time; $i += 86400) {
         $end = $i + 86399;
         $strQuery = "select sum({$field_name}) 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']);
         mysql_free_result($result2);
         if ($cat == "Revenue") {
             $revenue[] = $ors2['TotOutput'];
         } elseif ($cat == "Expense") {
             $expense[] = $ors2['TotOutput'];
         }
         $num++;
     }
     mysql_close($dbh);
 }
 $FC->addDataset("Profit");
 $profit = array();
 for ($i = 0; $i <= sizeof($revenue); $i++) {
     $profit = $revenue[$i] - $expense[$i];
     $FC->addChartData($profit);
开发者ID:jprecht,项目名称:ppc-coach-tracker,代码行数:31,代码来源:graphs-guts.php

示例15: FusionCharts

//multilingual text 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 2d chart object
$FC = new FusionCharts("Column2D", "500", "400");
# Set Relative Path of swf file.
$FC->setSWFPath("../../FusionCharts/");
# Set Chart attributes
$FC->setChartParams("caption=Monthly Sales Summary;subcaption=For the year 2008;");
$FC->setChartParams("xAxisName=Month;yAxisName=Sales;numberPrefix=\$;showNames=1;");
$FC->setChartParams("showValues=0;showColumnShadow=1;animation=1;");
$FC->setChartParams("baseFontColor=666666;lineColor=FF5904;lineAlpha=85;");
$FC->setChartParams("valuePadding=10;labelDisplay=rotate;useRoundEdges=1");
#add chart data values and category names
$FC->addChartData("17400", "Label=januári");
$FC->addChartData("19800", "Label=Fevruários");
$FC->addChartData("21800", "Label=مارس");
$FC->addChartData("23800", "Label=أبريل");
$FC->addChartData("29600", "Label=五月");
$FC->addChartData("27600", "Label=六月");
$FC->addChartData("31800", "Label=תִּשׁרִי");
$FC->addChartData("39700", "Label=Marešwān");
$FC->addChartData("37800", "Label=settèmbre");
$FC->addChartData("21900", "Label=ottàgono");
$FC->addChartData("32900", "Label=novèmbre");
$FC->addChartData("39800", "Label=décembre");
# apply style
$FC->defineStyle("myCaptionFont", "Font", "size=12");
$FC->applyStyle("DATALABELS", "myCaptionFont");
# Render  Chart
开发者ID:bamcod,项目名称:Disease-Surveillance,代码行数:31,代码来源:dataXML.php


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