• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP FusionCharts类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: FusionCharts

function FusionCharts($chart_type = '', $width = "300", $height = "250")
{
    require_once 'fusion/FusionCharts_Gen.php';
    $FC = new FusionCharts($chart_type, $width, $height);
    $FC->setSWFPath(base_url() . "chart/");
    return $FC;
}
开发者ID:laiello,项目名称:ksu,代码行数:7,代码来源:fusion_helper.php


示例2: mychart

 function mychart()
 {
     //$this->load->libraries('fusion_pi');
     $arrData = array();
     $FC = new FusionCharts("Column3D", "720", "400");
     /*$arrData = array( 500, 269, 254, 895, 633);  
       foreach( $arrData as $i=>$data ){  
           $FC->addChartData( $data );  
       } */
     //$sql="select count(distinct(nama_spb)) as nama_spb,month(tgl_spb) as bln from spb group by concat(month(tgl_spb),year(tgl_spb))";
     //echo $sql;
     $FC->setDataURL("graph.xml");
     $strParam = "numberSuffix=; formatNumberScale=0; decimalPrecision=0; xAxisName=Bulan; animation=1";
     $FC->setChartParams($strParam);
     $FC->setChartMessage("ChartNoDataText=Chart Data not provided; PBarLoadingText=Please Wait.The chart is loading...");
     return $FC->renderChart(false, false);
 }
开发者ID:laiello,项目名称:ksu,代码行数:17,代码来源:laporan.php


示例3: 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


示例4: sum

                $start = $_POST["start"];
                $end = $_POST["end"];
                if (strtotime($end) < strtotime($start)) {
                    echo "Tanggal tidak valid";
                } else {
                    $per_periode = "SELECT nama_barang, sum(n_pakai) as 'jumlah pemakaian' FROM t_pemakaian WHERE tanggal<='" . $end . "' and tanggal>='" . $start . "' GROUP BY kode_barang";
                    $result = $conn->query($per_periode);
                    echo "<br>";
                    if ($result->num_rows > 0) {
                        include "fusioncharts.php";
                        $arrData = array("chart" => array("caption" => "Pemakaian ATK dari periode " . $start . " sampai " . $end, "xAxisName" => "Nama Barang", "yAxisName" => "Jumlah Pemakaian (pcs)"));
                        $arrData["data"] = array();
                        while ($row = mysqli_fetch_array($result)) {
                            array_push($arrData["data"], array("label" => $row["nama_barang"], "value" => $row["jumlah pemakaian"]));
                        }
                        $chart = new FusionCharts("column2D", "periodChart", 600, 400, "chart-1", "json", json_encode($arrData));
                        $chart->render();
                        ?>
						    <div id="chart-1"></div>
						    <?php 
                    } else {
                        echo "tidak ada hasil";
                    }
                }
            }
        }
    }
}
$conn->close();
?>
						</div>
开发者ID:teaolivia,项目名称:SmartATK,代码行数:31,代码来源:stats.php


示例5: FusionCharts

	-->
	</style>
</HEAD>
<BODY>

<CENTER>
<h2>FusionCharts Examples</h2>
<h4>Example using XML having multilingual text</h4>
<?php 
//This page demonstrates the ease of generating charts containing UTF-8 encoded
//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=六月");
开发者ID:bamcod,项目名称:Disease-Surveillance,代码行数:31,代码来源:dataXML.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

<?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


示例8: array

// If the query returns a valid response, prepare the JSON string
if ($result) {
    // The `$arrData` array holds the chart attributes and data
    $arrData = array("chart" => array("caption" => "Cereal Crop Index", "paletteColors" => "#0075c2", "bgColor" => "#ffffff", "borderAlpha" => "20", "canvasBorderAlpha" => "0", "usePlotGradientColor" => "0", "plotBorderAlpha" => "10", "showXAxisLine" => "1", "xAxisLineColor" => "#999999", "showValues" => "0", "divlineColor" => "#999999", "divLineIsDashed" => "1", "showAlternateHGridColor" => "0"));
    $arrData["data"] = array();
    // Push the data into the array
    while ($row = mysqli_fetch_array($result)) {
        array_push($arrData["data"], array("label" => $row["district_name"], "value" => $row["cerial_index"]));
    }
    /*JSON Encode the data to retrieve the string containing the JSON representation of the data in the array. */
    $jsonEncodedData = json_encode($arrData);
    /*Create an object for the column chart using the FusionCharts PHP class constructor. Syntax for the constructor is ` FusionCharts("type of chart", "unique chart id", width of the chart, height of the chart, "div id to render the chart", "data format", "data source")`. Because we are using JSON data to render the chart, the data format will be `json`. The variable `$jsonEncodeData` holds all the JSON data for the chart, and will be passed as the value for the data source parameter of the constructor.*/
    $columnChart1 = new FusionCharts("Column3D", "myFirstChart1", 1000, 500, "chart-1", "json", $jsonEncodedData);
    $columnChart2 = new FusionCharts("Pie3D", "myFirstChart2", 1000, 500, "chart-2", "json", $jsonEncodedData);
    $columnChart3 = new FusionCharts("line", "myFirstChart3", 1000, 500, "chart-3", "json", $jsonEncodedData);
    $columnChart4 = new FusionCharts("area2D", "myFirstChart4", 1000, 500, "chart-4", "json", $jsonEncodedData);
    // Render the chart
    $columnChart1->render();
    $columnChart2->render();
    $columnChart3->render();
    $columnChart4->render();
    // Close the database connection
    $dbhandle->close();
}
?>
    <div id="chart-1"><!-- Fusion Charts will render here--></div>
    <div id="chart-2"><!-- Fusion Charts will render here--></div>
    <div id="chart-3"><!-- Fusion Charts will render here--></div>
    <div id="chart-4"><!-- Fusion Charts will render here--></div>

   </body>
开发者ID:Suba-Sah,项目名称:Major-Project,代码行数:31,代码来源:cerealcrop.php


示例9: connectToDB

	</style>
</HEAD>
<BODY>

<CENTER>
<h2><a href="http://www.fusioncharts.com" target="_blank">FusionCharts Free</a> -Database and Drill-Down Example</h2>


<?php 
//In this example, we show how to connect FusionCharts to a database.
//For the sake of ease, we've used an MySQL databases containing two
//tables.
// Connect to the Database
$link = connectToDB();
# Create pie 3d chart object using FusionCharts PHP Class
$FC = new FusionCharts("Pie3D", "650", "450");
# Set Relative Path of swf file.
$FC->setSwfPath("../../FusionCharts/");
//Store chart attributes in a variable for ease of use
$strParam = "caption=Factory Output report;subCaption=By Quantity;pieSliceDepth=30; showBorder=1;showNames=1;formatNumberScale=0;numberSuffix= Units;decimalPrecision=0";
#  Set chart attributes
$FC->setChartParams($strParam);
// Fetch all factory records usins SQL Query
//Store chart data values in 'total' column/field and category names in 'FactoryName'
$strQuery = "select a.FactoryID, b.FactoryName, sum(a.Quantity) as total from Factory_output a, Factory_Master b where a.FactoryId=b.FactoryId group by a.FactoryId,b.FactoryName";
$result = mysql_query($strQuery) or die(mysql_error());
//Pass the SQL Query result to the FusionCharts PHP Class function
//along with field/column names that are storing chart values and corresponding category names
//to set chart data from database
if ($result) {
    $FC->addDataFromDatabase($result, "total", "FactoryName");
开发者ID:farzam65,项目名称:YetiShare-File-Hosting-Script-Free,代码行数:31,代码来源:BasicDBExample.php


示例10: connectToDB

<?php 
//This page builds XML from database. The database contains UTF-8 encoded multilingual text.
//We have pre encoded this file as UTF-8 encoded with BOM
//Hence, we would just retrieve the text and relay it to the chart
//We've included  ../../Includes/DBConn.php, which contains functions
//to help us easily connect to a database.
include "../../Includes/DBConn.php";
//We've included ../Includes/FusionCharts_Gen.php, which FusionCharts PHP Class
//to help us easily embed the charts.
include "../../Includes/FusionCharts_Gen.php";
//For the sake of ease, we've used an MySQL databases - sales and all data in a table - 'monthly_utf8'
//Connect to the Database
$link = connectToDB('sales');
# Create column 2d chart object
$FC = new FusionCharts("Column2D", "500", "400");
# 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");
//Connect to the DB
$link = connectToDB('sales');
// Fetch all factory records
$strQuery = "select * from monthly_utf8";
$result = mysql_query($strQuery) or die(mysql_error());
//Pass the SQL Query result to the FusionCharts PHP Class function
//along with field/column names that are storing chart values and corresponding category names
//to set chart data from database
if ($result) {
    $FC->addDataFromDatabase($result, "amount", "month_name");
开发者ID:tyxing007,项目名称:pet-service,代码行数:31,代码来源:getXMLFromDatabase.php


示例11: FusionCharts

</HEAD>


<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");
开发者ID:laiello,项目名称:ksu,代码行数:31,代码来源:FirstChart.php


示例12: FusionCharts

<?php

# Include FusionCharts PHP Class
include "../Class/FusionCharts_Gen.php";
# Create Column 3D + Line Dual Y-Axis Combination Chart
$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");
开发者ID:bamcod,项目名称:Disease-Surveillance,代码行数:31,代码来源:CombinationChart.php


示例13: FusionCharts

<?php

# Include FusionCharts PHP Class
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>
开发者ID:tyxing007,项目名称:pet-service,代码行数:31,代码来源:ssgrid.php


示例14: distancia_sup

</style>
</head>
<body>	
	<?php 
if (isset($_REQUEST["area_rep"])) {
    ?>
		<script type="text/javascript">
			$(document).ready(function(){
			top = distancia_sup(document.getElementById("grafica"));
			$("#ayuda").css("top",top)
		});
		</script>
	<?php 
    $areas = $reporte->obtener_area($_REQUEST["area_rep"]);
    $area = $areas[0];
    $FC = new FusionCharts("Column3D", "720", "350");
    $FC->setSWFPath("../../FusionCharts/");
    $strParam = "caption=Productividad de Usuarios de " . $area["abreviatura"] . ";xAxisName=Usuario;yAxisName = Productividad (%)";
    $FC->setChartParams($strParam);
    ?>
	<form name="form_reporte" action="">	
	<table width="92%" border="0" align="center">
	<?php 
    if ($_REQUEST["tipo"] != 1 && $_REQUEST["tipo"] != 2) {
        ?>
	  <tr id = "barra_botones">
	    <td>&nbsp;</td>
        <td colspan="2">&nbsp;</td>
        <td colspan="5">&nbsp;</td>
        <td colspan="2">&nbsp;</td>
        <td>&nbsp;</td>
开发者ID:electromanlord,项目名称:sgd,代码行数:31,代码来源:tiempo_espera_usuario.php


示例15: FusionCharts

<?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=\$;decimals=0;formatNumberScale=0";
# Set chart attributes
$FC->setChartParams($strParam);
# Add chart values and category names
$FC->addChartData("40800", "label=Week 1;alpha=40;showLabel=0;showValue=0");
$FC->addChartData("31400", "label=Week 2;alpha=40;showLabel=0;showValue=0");
$FC->addChartData("26700", "label=Week 3;hoverText=Lowest;link=tooLow.php");
$FC->addChartData("54400", "label=Week 4;showLabel=0;showValue=0; alpha=40; toolText=Highest");
?>
<html>
  <head>
    <title>First Chart - Advanded - Set Other Elements : Using FusionCharts PHP Class</title>
    <script language='javascript' src='../FusionCharts/FusionCharts.js'></script>
  </head>
  <body>

  <?php 
# Render Chart
$FC->renderChart();
?>

  </body>
开发者ID:bamcod,项目名称:Disease-Surveillance,代码行数:31,代码来源:FirstChart_OtherElements.php


示例16: getFusionchart

 function getFusionchart()
 {
     $document =& JFactory::getDocument();
     $params =& $this->getParams();
     $worker = new FabrikWorker();
     $fc_version = $params->get('fusionchart_version', 'free_old');
     if ($fc_version == 'free_22') {
         require_once $this->pathBase . 'fusionchart' . DS . 'lib' . DS . 'FusionChartsFree' . DS . 'Code' . DS . 'PHPClass' . DS . 'Includes' . DS . 'FusionCharts_Gen.php';
         $document->addScript($this->srcBase . "fusionchart/lib/FusionChartsFree/JSClass/FusionCharts.js");
         $fc_swf_path = COM_FABRIK_LIVESITE . $this->srcBase . "fusionchart/lib/FusionChartsFree/Charts/";
     } else {
         if ($fc_version == 'pro_30') {
             require_once $this->pathBase . 'fusionchart' . DS . 'lib' . DS . 'FusionCharts' . DS . 'Code' . DS . 'PHPClass' . DS . 'Includes' . DS . 'FusionCharts_Gen.php';
             $document->addScript($this->srcBase . "fusionchart/lib/FusionCharts/Charts/FusionCharts.js");
             $fc_swf_path = COM_FABRIK_LIVESITE . $this->srcBase . "fusionchart/lib/FusionCharts/Charts/";
         } else {
             require_once $this->pathBase . 'fusionchart' . DS . 'lib' . DS . 'FCclass' . DS . 'FusionCharts_Gen.php';
             $document->addScript($this->srcBase . "fusionchart/lib/FCcharts/FusionCharts.js");
             $fc_swf_path = COM_FABRIK_LIVESITE . $this->srcBase . "fusionchart/lib/FCcharts/";
         }
     }
     $calc_prefixes = array('sum___', 'avg___', 'med___', 'cnt___');
     $calc_prefixmap = array('sum___' => 'sums', 'avg___' => 'avgs', 'med___' => 'medians', 'cnt___' => 'count');
     $w = $params->get('fusionchart_width');
     $h = $params->get('fusionchart_height');
     $chartType = $params->get('fusionchart_type');
     // Create new chart
     $FC = new FusionCharts("{$chartType}", "{$w}", "{$h}");
     //$FC->JSC["debugmode"]=true;
     // Define path to FC's SWF
     $FC->setSWFPath($fc_swf_path);
     $this->setChartMessages($FC);
     // Setting Param string
     $strParam = $this->getChartParams();
     $label_step_ratios = (array) $params->get('fusion_label_step_ratio');
     $x_axis_label = (array) $params->get('fusion_x_axis_label');
     $chartElements = (array) $params->get('fusionchart_elementList');
     $chartColours = (array) $params->get('fusionchart_colours');
     $listid = (array) $params->get('fusionchart_table');
     $axisLabels = (array) $params->get('fusionchart_axis_labels');
     foreach ($axisLabels as $axis_key => $axis_val) {
         //$worker->replaceRequest($axis_val);
         $axisLabels[$axis_key] = $worker->parseMessageForPlaceholder($axis_val, null, false);
     }
     $dual_y_parents = $params->get('fusionchart_dual_y_parent');
     $measurement_units = (array) $params->get('fusion_x_axis_measurement_unit');
     $legends = $params->get('fusiongraph_show_legend', '');
     $chartWheres = (array) $params->get('fusionchart_where');
     $c = 0;
     $gdata = array();
     $glabels = array();
     $gcolours = array();
     $gfills = array();
     $max = array();
     $min = array();
     $calculationLabels = array();
     $calculationData = array();
     $calcfound = false;
     $tmodels = array();
     $labelStep = 0;
     foreach ($listid as $tid) {
         $min[$c] = 0;
         $max[$c] = 0;
         if (!array_key_exists($tid, $tmodels)) {
             $listModel = null;
             $listModel = JModel::getInstance('list', 'FabrikFEModel');
             $listModel->setId($tid);
             $tmodels[$tid] = $listModel;
         } else {
             $listModel = $tmodels[$tid];
         }
         $table = $listModel->getTable();
         $form = $listModel->getForm();
         // $$$ hugh - adding plugin query, 2012-02-08
         if (array_key_exists($c, $chartWheres) && !empty($chartWheres[$c])) {
             $chartWhere = $this->_replaceRequest($chartWheres[$c]);
             $listModel->setPluginQueryWhere('fusionchart', $chartWhere);
         } else {
             // if no where clause, explicitly clear any previously set clause
             $listModel->unsetPluginQueryWhere('fusionchart');
         }
         // $$$ hugh - remove pagination BEFORE calling render().  Otherwise render() applies
         // session state/defaults when it calls getPagination, which is then returned as a cached
         // object if we call getPagination after render().  So call it first, then render() will
         // get our cached pagination, rather than vice versa.
         $nav = $listModel->getPagination(0, 0, 0);
         $listModel->render();
         //$listModel->doCalculations();
         $alldata = $listModel->getData();
         $cals = $listModel->getCalculations();
         $column = $chartElements[$c];
         //$measurement_unit = $measurement_units[$c];
         $measurement_unit = JArrayHelper::getValue($measurement_units, $c, '');
         $pref = substr($column, 0, 6);
         $label = JArrayHelper::getValue($x_axis_label, $c, '');
         $tmpgdata = array();
         $tmpglabels = array();
         $colour = array_key_exists($c, $chartColours) ? str_replace("#", '', $chartColours[$c]) : '';
         $gcolours[] = $colour;
         if (in_array($pref, $calc_prefixes)) {
//.........这里部分代码省略.........
开发者ID:rhotog,项目名称:fabrik,代码行数:101,代码来源:fusionchart.php


示例17: FusionCharts

//Store Name of Products
$arrData[0][0] = "Product A";
$arrData[1][0] = "Product B";
$arrData[2][0] = "Product C";
$arrData[3][0] = "Product D";
$arrData[4][0] = "Product E";
$arrData[5][0] = "Product F";
//Store sales data
$arrData[0][1] = 567500;
$arrData[1][1] = 815300;
$arrData[2][1] = 556800;
$arrData[3][1] = 734500;
$arrData[4][1] = 676800;
$arrData[5][1] = 648500;
# Create FusionCharts PHP Class object for single series column3d chart
$FC = new FusionCharts("Column3D", "600", "300");
# Set Relative Path of swf file.
$FC->setSwfPath("../../FusionCharts/");
# store chart attributes in a variable
$strParam = "caption=Sales by Product;numberPrefix=\$;formatNumberScale=0;decimalPrecision=0";
#  Set chart attributes
$FC->setChartParams($strParam);
## call FusionCharts PHP Class Function to add data from the array
$FC->addChartDataFromArray($arrData);
# Render the chart
$FC->renderChart();
?>
<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>
开发者ID:farzam65,项目名称:YetiShare-File-Hosting-Script-Free,代码行数:30,代码来源:SingleSeries.php


示例18: pg_query

      <!-- FusionCharts core package JS files -->
      <script src="http://static.fusioncharts.com/code/latest/fusioncharts.js"></script>
      <script src="http://static.fusioncharts.com/code/latest/fusioncharts.charts.js"></script>
      <script src="http://static.fusioncharts.com/code/latest/themes/fusioncharts.theme.fint.js"></script>
   </head>
   <body>

<?php 
pg_query($dbconn, "SELECT DISTINCT browser, shareval FROM browsershare; ");
$result = pg_query($dbconn, "SELECT DISTINCT browser, shareval FROM browsershare; ") or exit("Error with quering database");
if ($result) {
    // creating an associative array to store the chart attributes
    $arrData = array("chart" => array("theme" => "fint", "caption" => "Browser Market Share", "subcaption" => "February 2016", "captionFontSize" => "24", "paletteColors" => "#A2A5FC, #41CBE3, #EEDA54, #BB423F #,F35685", "baseFont" => "Quicksand, sans-serif", "baseFontColor" => "#FFFFFF", "baseFontSize" => "14", "numberSuffix" => "%", "showBorder" => "0", "startingAngle" => "0", "showPercentValues" => "0", "showPercentInTooltip" => "0", "decimals" => "1", "labelFontColor" => "#FFFFFF", "labelFontSize" => "14", "bgColor" => "#50585F", "bgAlpha" => "100", "doughnutRadius" => "50", "enableSmartLabels" => "1", "smartLineColor" => "#FCFDFD", "smartLineThickness" => "1", "showLegend" => "1", "legendBorderAlpha" => '0', "legendShadow" => '0', "legendItemFontSize" => '10', "legendItemFontColor" => "#FFFFFF", "toolTipBgColor" => "#000000", "toolTipBgAlpha" => "70", "toolTipPadding" => "10", "toolTipBorderColor" => "#FFFFFF", "toolTipBorderThickness" => "1", "toolTipBorderRadius" => "2"));
    $arrData["data"] = array();
    // iterating over each data and pushing it into $arrData array
    while ($row = pg_fetch_array($result)) {
        array_push($arrData["data"], array("label" => $row["browser"], "value" => $row["shareval"]));
    }
    $jsonEncodedData = json_encode($arrData);
    // creating FusionCharts instance
    $doughnutChart = new FusionCharts("doughnut2d", "browserShareChart", '100%', 450, "doughnut-chart", "json", $jsonEncodedData);
    // FusionCharts render method
    $doughnutChart->render();
    // closing database connection
    pg_close($dbconn);
}
?>
 	<!-- creating chart container --> 	
 	<div id="doughnut-chart">A beautiful donut chart is on its way!</div>
   </body>
</html>
开发者ID:sikrigagan,项目名称:FusionCharts-Samples,代码行数:31,代码来源:index.php


示例19: FusionCharts

//forms or databases etc.Such examples are also present.
//Here, we've kept this example very simple.
//Create an XML data document in a string variable
$strXML = "<Chart caption='Monthly Unit Sales' xAxisName='Month' yAxisName='Units' >";
$strXML .= "<set Label='Jan' value='462' />";
$strXML .= "<set Label='Feb' value='857' />";
$strXML .= "<set Label='Mar' value='671' />";
$strXML .= "<set Label='Apr' value='494' />";
$strXML .= "<set Label='May' value='761' />";
$strXML .= "<set Label='Jun' value='960' />";
$strXML .= "<set Label='Jul' value='629' />";
$strXML .= "<set Label='Aug' value='622' />";
$strXML .= "<set Label='Sep' value='376' />";
$strXML .= "<set Label='Oct' value='494' />";
$strXML .= "<set Label='Nov' value='761' />";
$strXML .= "<set Label='Dec' value='960' />";
$strXML .= "</Chart>";
# Create object of FusionCharts class of single series
$FC = new FusionCharts("Column3D", "600", "300");
# Set Relative Path of swf file. default path is “charts/”
$FC->setSWFPath("../../FusionCharts/");
//Create the chart - Column 3D Chart with data from strXML
# Create the Chart
$FC->renderChartFromExtXML($strXML);
?>
<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:pawelniewie,项目名称:5groszy.pl,代码行数:31,代码来源:CreateChartFromExtData.php


示例20: array

$result->bindParam('tahun', $tahun, PDO::PARAM_INT);
$result->execute();
// If the query returns a valid response, prepare the JSON string
if ($result) {
    // The `$arrData` array holds the chart attributes and data
    $arrData = array("chart" => array("caption" => "Jumlah Gangguan Penyulang > 5 menit Per Area Unit", "bgColor" => "#ffffff", "borderAlpha" => "20", "canvasBorderAlpha" => "0", "usePlotGradientColor" => "0", "plotBorderAlpha" => "10", "showXAxisLine" => "1", "xAxisLineColor" => "#999999", "showValues" => "0", "divlineColor" => "#999999", "divLineIsDashed" => "1", "showAlternateHGridColor" => "0"));
    $arrData["data"] = array();
    // Push the data into the array
    while ($row = $result->fetch()) {
        $GANGGUANTOTAL = @($row["BESAR5"] + $row["KECIL5"]) / $row["PANJANG"];
        array_push($arrData["data"], array("label" => $row["AREA"], "value" => $GANGGUANTOTAL));
    }
    /*JSON Encode the data to retrieve the string containing the JSON representation of the data in the array. */
    $jsonEncodedData = json_encode($arrData);
    /*Create an object for the column chart using the FusionCharts PHP class constructor. Syntax for the constructor is ` FusionCharts("type of chart", "unique chart id", width of the chart, height of the chart, "div id to render the chart", "data format", "data source")`. Because we are using JSON data to render the chart, the data format will be `json`. The variable `$jsonEncodeData` holds all the JSON data for the chart, and will be passed as the value for the data source parameter of the constructor.*/
    $columnChart = new FusionCharts("column2D", "myFirstChart", 700, 350, "chartContainer", "json", $jsonEncodedData);
    // Render the chart
    $columnChart->render();
    // Close the database connection
    $conn = null;
}
?>


<title> Rekapitulasi Laporan Gangguan Penyulang</title>
<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            Rekapitulasi Laporan
            <small>Gangguan Penyulang</small>
开发者ID:arsan-irianto,项目名称:apdpln,代码行数:31,代码来源:dashboard.php



注:本文中的FusionCharts类示例整理自Github/MSDocs等源码及文档管理平台,相


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP FusionCore_Plugin类代码示例发布时间:2022-05-23
下一篇:
PHP Functions_Lib类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap