Пример #1
0
function line_chart_fusion2($datax, $datay, $title, $width = 500, $height = 369)
{
    if (!is_array($datax) || !is_array($datay)) {
        return "";
    }
    $fileContents = '';
    foreach ($datay as $datay_item) {
        $fileContents .= "<set name='" . $datay_item . "' value='" . $datax[$datay_item] . "'/>";
    }
    $fileContents = "<graph labelDisplay='WRAP' caption='" . $title . "' shownames='1' showvalues='1' decimalPrecision='0' outCnvBaseFontSize='12' baseFontSize='12' pieYScale='45' pieBorderAlpha='40' pieFillAlpha='70' pieSliceDepth='15' pieRadius='100'>" . $fileContents . "</graph>";
    $return = renderChartHTML("include/fusioncharts/Charts/FCF_Line.swf", "", $fileContents, "reportChart", $width, $height);
    return $return;
}
Пример #2
0
function vertical_graph_fusion2($datax, $datay, $title, $width = 800, $height = 400)
{
    if (!is_array($datay) || !is_array($datax)) {
        return;
    }
    $fileContents = '';
    $i = 0;
    foreach ($datay as $datay_item) {
        $color = generate_fusioncharts_color($datay_item, $i);
        $fileContents .= "<set name='" . $datay_item . "' value='" . $datax[$datay_item] . "' color='" . $color . "' />";
        $i++;
    }
    $fileContents = "<graph labelDisplay='WRAP' caption='" . $title . "' shownames='1' showvalues='1'  numDivLines='4' formatNumberScale='0' decimalPrecision='0'\nanchorSides='10' anchorRadius='3' anchorBorderColor='009900' outCnvBaseFontSize='12' baseFontSize='12'>" . $fileContents . "</graph>";
    $return = renderChartHTML("include/fusioncharts/Charts/FCF_Column3D.swf", "", $fileContents, "reportChart", $width, $height);
    return $return;
}
Пример #3
0
<?php

require_once "../includes/FusionCharts.php";
require_once '../includes/connect.php';
$sql = "select extract( Year from vm.voucher_date),\n" . "sum( case when vd.account_code = 4001 then vd.credit_amount-vd.debit_amount else 0 end ) Sales\n" . ", sum( case when vd.account_code > 5000 then vd.debit_amount-vd.credit_amount else 0 end ) Expenses\n" . "from voucher_master vm\n" . "inner join voucher_detail vd on vd.voucher_id = vm.voucher_id\n" . "group by extract( Year from vm.voucher_date)\n" . "order by 1 asc\n" . "limit 0, 5\n";
$result = mysql_query($sql) or die("Couldn t execute query." . mysql_error());
$rows = array();
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
    $rows[] = $row;
}
$strXML = "";
$strXML .= "<chart palette='1' showValues='0' yAxisValuesPadding='10' numberPrefix='Rs' bgColor='f7f2ea' borderColor='f7f2ea' borderthickness='0' bgAlpha='0'>";
$strXML .= "<categories>";
foreach ($rows as $row) {
    $strXML .= "<category label='{$row['0']}' />";
}
$strXML .= "</categories>";
$strXML .= "<dataset seriesName='Sales'>";
foreach ($rows as $row) {
    $strXML .= "<set value='{$row['1']}' />";
}
$strXML .= "</dataset>";
$strXML .= "<dataset seriesName='Expenses' renderAs='Line'>";
foreach ($rows as $row) {
    $strXML .= "<set value='{$row['2']}' />";
}
$strXML .= "</dataset>";
$strXML .= "</chart>";
echo renderChartHTML("../swf/MSColumnLine3D.swf", "", $strXML, "chart1", 400, 270, false, false, "true");
Пример #4
0
<?php

require_once "../includes/FusionCharts.php";
require_once '../includes/connect.php';
$sql = "select p.party_city, sum(sd.sales_qty*sd.sales_rate) Sale_Amount\n" . "from sales_master sm\n" . "inner join sales_detail sd on sm.sale_master_id = sd.sale_master_id\n" . "left outer join party p on p.party_code = sm.party_code\n" . "where sm.company_ref_id = {$_SESSION['company_id']}\n" . "and p.party_name is not null\n" . "group by p.party_city\n" . "order by 2 desc\n" . "limit 0, 5";
$result = mysql_query($sql) or die("Couldn t execute query." . mysql_error());
$rows = array();
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
    $rows[] = $row;
}
$strXML = "";
$strXML .= "<chart decimals='0' numberPrefix='Rs' isHollow='0' streamlinedData='0' bgColor='f7f2ea' borderColor='f7f2ea' borderthickness='0' bgAlpha='0'>";
foreach ($rows as $row) {
    $strXML .= "<set label='{$row['0']}' value='{$row['1']}' />";
}
$strXML .= "</chart>";
echo renderChartHTML("../swf/Funnel.swf", "", $strXML, "chart3", 400, 270, false, false, "true");
Пример #5
0
//$sql = $db->query("SELECT distinct(tplid) FROM ".DB_TABLEPRE."workclass where DATE_SUB(CURDATE(), INTERVAL 1 DAY)<=date(date)  ORDER BY id Asc");
$sql = $db->query("SELECT distinct(tplid) FROM " . DB_TABLEPRE . "workclass where DATEDIFF(date,NOW()) =0 ORDER BY id Asc");
while ($row = $db->fetch_array($sql)) {
    $tplid .= $row['tplid'] . ',';
}
$sql = $db->query("SELECT tplid,title FROM " . DB_TABLEPRE . "workclass_template where tplid in(" . substr($tplid, 0, -1) . ") ORDER BY tplid Asc");
while ($row = $db->fetch_array($sql)) {
    //$numtpl = $db->result("SELECT COUNT(*) AS numtpl FROM ".DB_TABLEPRE."workclass WHERE tplid='".$row['tplid']."' and DATE_SUB(CURDATE(), INTERVAL 1 DAY)<=date(date)");
    $numtpl = $db->result("SELECT COUNT(*) AS numtpl FROM " . DB_TABLEPRE . "workclass WHERE tplid='" . $row['tplid'] . "' and DATEDIFF(date,NOW()) =0");
    $strtype1 .= "<set label='" . $row['title'] . "' value='" . $numtpl . "' />";
}
$strtype1 .= "</chart>";
?>

<div id="module_3" class="module listColor"><div class="head"><h4 id="module_3_head" class="module_0169c2 color_style_0 moduleHeader"><a href="javascript:_resize(3);" class="expand expand_arrow" id="img_resize_3" title="折叠"></a><span id="module_3_text" class="text" onclick="_resize(3);">今日流程</span></h4></div><div id="module_3_body" class="module_body"><div id="module_3_ul" class="module_div"><?php 
echo renderChartHTML("template/fusioncharts/Line.swf", "", $strtype1, "", $fw, $fh, false);
?>
</div></div></div>
<div class="shadow"></div>
<div class="shadow"></div>
  </td>
  <td id="col_r" valign="top">
	
<?php 
home_workclass(1);
?>


<div class="shadow"></div>
  </td>
 </tr>
$strXML .= "<set label = 'Animales Perdidos' value ='" . $intTotalAnio7 . "' color = 'EA1000' />";
$strXML .= "<set label = 'Estados de solicitudes activas' value ='" . $intTotalAnio8 . "' color = '0000FF' />";
$strXML .= "<set label = 'Ciudades Activas en SIZ' value ='" . $intTotalAnio9 . "' color = 'EA1000' />";
$strXML .= "<set label = 'Animales Registrados' value ='" . $intTotalAnio9 . "' color = '6D8D16' />";
// Cerramos la etiqueta "chart".
$strXML .= "</chart>";
// Por último imprimo el gráfico.
// renderChartHTML: función que se encuentra en el archivo FusionCharts.php
// Envía varios parámetros.
// 1er parámetro: indica la ruta y nombre del archivo "swf" que contiene el gráfico. En este caso Columnas ( barras) 3D
// 2do parámetro: indica el archivo "xml" a usarse para graficar. En este caso queda vacío "", ya que los parámetros lo pasamos por PHP.
// 3er parámetro: $strXML, es el archivo parámetro para el gráfico.
// 4to parámetro: "ejemplo". Es el identificador del gráfico. Puede ser cualquier nombre.
// 5to y 6to parámetro: indica ancho y alto que tendrá el gráfico.
// 7mo parámetro: "false". Trata del "modo debug". No es im,portante en nuestro caso, pero pueden ponerlo a true ara probarlo.
echo renderChartHTML("Column3D.swf", "", $strXML, "Estadisticas", 700, 400, false);
?>
                 
                        
                     
                        </p>
                    </div>				
					<br class="clear" />
				</div>
				<div id="sidebar">
					<h3>
                    
                  </h3>
					<div class="form">
					  <p><?php 
echo $_SESSION['usuario'];
Пример #7
0
	FusionCharts Free - Simple Column 3D Chart
	</TITLE>
	<style type="text/css">
	<!--
	body {
		font-family: Arial, Helvetica, sans-serif;
		font-size: 12px;
	}
	-->
	</style>
</HEAD>
<BODY>

<CENTER>
<h2><a href="http://www.fusioncharts.com" target="_blank">FusionCharts Free</a> Examples</h2>
<h4>Basic example using pre-built Data.xml</h4>
<?php 
//This page demonstrates the ease of generating charts using FusionCharts.
//For this chart, we've used a pre-defined Data.xml (contained in /Data/ folder)
//Ideally, you would NOT use a physical data file. Instead you'll have
//your own PHP scripts virtually relay the XML data document. Such examples are also present.
//For a head-start, we've kept this example very simple.
//Create the chart - Column 3D Chart with data from Data/Data.xml
echo renderChartHTML("../../FusionCharts/FCF_Column3D.swf", "Data/Data.xml", "", "myFirst", 600, 300, false);
?>
<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>
Пример #8
0
?>
" style="font-size:12px;">面积图展示</a>


</div>
</div>
<div style="position:absolute; height:90%; width:100%;overflow:auto"> 
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="0" class="small" style="margin-top:6px;">
  <tr>
    <td class="Big" style="font-size:12px;"><img src="template/default/content/images/notify_new.gif" align="absmiddle"><span class="big3">项目<?php 
echo $title;
?>
统计</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="font-size:12px; float:right; margin-right:50px;">
	</span>
    </td>
  </tr>
</table>

<table width="98%" border="0" align="center" cellpadding="3" cellspacing="0" class="small">
  <tr>
    <td align="center" class="Big" style="font-size:12px;">
	<?php 
echo renderChartHTML("template/fusioncharts/" . $flashtype . ".swf", "", $strtype, "", $fw, $fh, false);
?>
    </td>
  </tr>
</table>
</div>
</body>
</html>
Пример #9
0
<?php

require_once "../includes/FusionCharts.php";
require_once '../includes/connect.php';
$sql = "select coa.account_name Employee, sum(vd.debit_amount-vd.credit_amount) Salary \n" . "from voucher_detail vd \n" . "inner join chart_of_account coa on coa.account_code = vd.account_code\n" . "where coa.company_ref_id = {$_SESSION['company_id']}\n" . "and coa.parent_account_code = 5001\n" . "group by coa.account_name\n" . "order by 2 desc\n" . "limit 0, 5\n";
$result = mysql_query($sql) or die("Couldn t execute query." . mysql_error());
$rows = array();
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
    $rows[] = $row;
}
$strXML = "";
$strXML .= "<chart palette='2' animation='1' formatNumberScale='0' numberPrefix='Rs' pieSliceDepth='30' startingAngle='125' bgColor='f7f2ea' borderColor='f7f2ea' borderthickness='0' bgAlpha='0'>";
$i = 0;
foreach ($rows as $row) {
    $isSliced = "isSliced='0'";
    if ($i < 3) {
        $isSliced = "isSliced='1'";
    }
    $strXML .= "<set label='{$row['0']}' value='{$row['1']}' {$isSliced} />";
    $i++;
}
$strXML .= "</chart>";
echo renderChartHTML("../swf/Pie3D.swf", "", $strXML, "chart5", 800, 270, false, false, "true");
Пример #10
0
<div class="row">
    <div class="box col-md-12" id="head">
        <div class="box-content">
        <div style="float:left; width:50%; ">
<?php 
include "FusionCharts.php";
include "Functions.php";
$strXML = "";
$strXML = "<chart caption = 'Habilidades' bgColor='' baseFontSize='12' showValues='1' xAxisName='Anios' >";
for ($i = 0; $i < 7; $i++) {
    $strXML .= "<set label = '" . $info[$i]->name . "' value ='" . $info[$i]->visits_number . "' />";
}
$strXML .= "</chart>";
echo renderChartHTML("Pie3D.swf", "", $strXML, "Habilidades", 600, 400, false);
?>
</div>
<div style="float:left; width:50%; ">
<?php 
$strXML = "";
$strXML = "<chart caption = 'Tecnologias' bgColor='' baseFontSize='12' showValues='1' xAxisName='Anios' >";
for ($i = 7; $i < 16; $i++) {
    $strXML .= "<set label = '" . $info[$i]->name . "' value ='" . $info[$i]->visits_number . "' />";
}
$strXML .= "</chart>";
echo renderChartHTML("Pie3D.swf", "", $strXML, "Tecnologías", 500, 400, false);
?>
  

</div>
        </div>
Пример #11
0
    case "branchvalue":
        $name = BranchValue();
        $table = tableBranchValue();
        $caption = "Inventory total Value by Branch";
        $xaxis = "Branch";
        $yaxis = "Total Value";
        $graphType = "FCF_Column2D";
        $td = " <td><strong>Category </strong></td>\r\n    <td><strong>Total Value</strong></td>";
        break;
    case 2:
        echo "i equals 2";
        break;
}
//end of if
$strXMLData = "<graph caption='{$caption}' subcaption='' xAxisName='{$xaxis}' yAxisName='{$yaxis}' numberPrefix='' showNames='1'  showValue='1' decimalPrecision='2'>" . $name . "</graph>";
echo renderChartHTML("charts/{$graphType}.swf", "", $strXMLData, "myNext", 600, 300);
?>

<h1><font color="#CCCCCC" size="3" face="Verdana, Arial, Helvetica, sans-serif"><strong>
    <?php 
echo $caption;
?>
    </strong></font></h1>
      
<table width="300" border="2" cellspacing="0" cellpadding="0">
  
  <tr bordercolor="#000000" align="center" bordercolordark="#000000"> <font size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
    <?php 
echo $td;
?>
   
Пример #12
0
$strXML .= "\t\t<category Name='Oct' />";
$strXML .= "\t\t<category Name='Nov' />";
$strXML .= "\t\t<category Name='Dec' />";
$strXML .= "\t</categories>";
for ($j = 0; $j < 3; $j++) {
    $sql = "select extract( Month from sm.sale_date),\n" . " sum(sd.sales_qty*sd.sales_rate) Sale_Amount\n" . "from sales_master sm\n" . "inner join sales_detail sd on sm.sale_master_id = sd.sale_master_id\n" . "where sm.company_ref_id = {$_SESSION['company_id']}\n" . "and extract( Year from sm.sale_date) = '" . (date("Y") - $j) . "'\n" . "group by extract( Month from sm.sale_date)\n" . "order by 1 asc";
    $result = mysql_query($sql) or die("Couldn t execute query." . mysql_error());
    $rows = array();
    for ($i = 1; $i <= 12; $i++) {
        $rows["{$i}"] = 0;
    }
    while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
        $rows["{$row['0']}"] = $row[1];
    }
    $strXML .= "\t<dataset seriesName='Year " . (date("Y") - $j) . "'>";
    for ($i = 1; $i <= 12; $i++) {
        $strXML .= "\t\t<set value='" . $rows["{$i}"] . "' />";
    }
    $strXML .= "\t</dataset>";
}
$strXML .= "\t<styles>";
$strXML .= "\t\t<definition>";
$strXML .= "\t\t\t<style name='myCaptionFont' type='font' size='14' bold='1' />";
$strXML .= "\t\t</definition>";
$strXML .= "\t\t<application>";
$strXML .= "\t\t\t<apply toObject='Caption' styles='myCaptionFont' />";
$strXML .= "\t\t</application>";
$strXML .= "\t</styles>";
$strXML .= "</chart>";
echo renderChartHTML("../swf/MSLine.swf", "", $strXML, "chart2", 400, 270, false, false, "true");
Пример #13
0
    $strXML = "";
    $strXML = $strXML . "<graph caption='Classes and Submitted Money percentages' xAxisName='Classes' yAxisName='Percentage' decimalPrecision='2' formatNumberScale='12'>";
    for ($i = 0; $i < $j; $i++) {
        if ($k == 8) {
            $k = 0;
        }
        if ($categor_money[$i] == 0) {
            $perc = 0.0;
        } else {
            $perc = $categor_money[$i] / $total * 100;
        }
        $strXML .= "<set name='{$categor[$i]}' value='{$perc}' color='{$Color_array[$k]}' />";
        $k++;
    }
    $strXML .= "</graph>";
    echo renderChartHTML("FCF_Column3D.swf", "", $strXML, "myNext", 950, 450);
    mysql_close($connection);
}
if ($batch == "p1" || $batch == "p2" || $batch == "select") {
    echo '
		<script language="javascript">
			$("#load_n").hide();
		</script>';
} else {
    if ($batch == "e1") {
        echo '
		<script language="javascript">
			$("#freshers").show();
		</script>';
    } else {
        echo '
Пример #14
0
    $mm = date('m', strtotime(date($y . '-' . $m . '-' . '01', strtotime($date)) . $i . " month"));
    $st = $Ym . '-' . $mm . '-' . '01';
    $end = $Ym . '-' . $mm . '-' . '31';
    $tick_mont_o = "SELECT nTicketId FROM sptbl_tickets WHERE dLastAttempted>='" . $st . "' AND dLastAttempted<='" . $end . "' AND vDelStatus = 0";
    $tick_count = mysql_query($tick_mont_o);
    $count = mysql_num_rows($tick_count);
    // $arrData1[1][$i+1] = $count;
    $strXML1 .= " <set value='" . $count . "' />";
}
$strXML1 .= "  </dataset>\r\n\r\n\r\n</chart>";
//$graphObj3 = new graph(2,986,170);
//$graphObj3->setChartParams("Ticket Status for period of ".date('d/m/Y',strtotime($first_day_this_month))."-".date('d/m/Y',strtotime($last_day_this_month)),'','',0,'');
//$graphObj3->addChartData($arrData1,$arrCatName);
//$graphObj3->renderChart();
//Create the chart - Column 3D Chart with data from strXML variable using dataStr method
echo renderChartHTML("../fusionchart/FusionCharts/MSLine.swf", "", $strXML1, "myNext", '987', '250', true, true);
?>

<div class="clear"></div>
    </div>
</div>
<div class="comm_spacediv">&nbsp;</div>
<!--<div class="DB_container_3">
  <!--  <h2><?php 
echo TEXT_LICENCE_INFORMATION;
?>
</h2>-->
    <!--<div class="DB_container_content">
       
      
	                                            
Пример #15
0
 function getPicklistChartHTML_Pie2D($picklistinf)
 {
     list($chartxml, $width, $height) = $this->getChartParams($picklistinf);
     $return = renderChartHTML("include/fusioncharts/Charts/FCF_Pie2D.swf", "", $chartxml, "reportChart", $width, $height);
     return $return;
 }
				
			</div>
			
			<div>
				<!-- TAB 5 -->
				<?php 
/* pie chart  */
$dataForPie = $db->getRows("SELECT os, COUNT(id) AS total FROM stats WHERE page_title = '" . $file->id . "' GROUP BY os ORDER BY total DESC LIMIT 20");
$strXML = "";
$strXML .= "<graph animation='1' showValues='0' showNames='1' pieRadius='95' decimalPrecision='0' formatNumberScale='0' baseFont='Arial' baseFontSize='10'>";
foreach ($dataForPie as $dataRow) {
    $position = rand(0, COUNT($colours) - 1);
    $strXML .= "<set name='" . $dataRow['os'] . "' value='" . $dataRow['total'] . "' color='" . $colours[$position] . "'/>";
}
$strXML .= "</graph>";
echo renderChartHTML("js/fusionCharts/Charts/FCF_Pie2D.swf", "", $strXML, "statusPie", 500, 250);
?>
				
				<?php 
/* total visits figure */
$totalVisits = 0;
foreach ($dataForPie as $dataRow) {
    $totalVisits = $totalVisits + $dataRow['total'];
}
?>
				
				<br/>
				
				<div class="dataTableWrapper">
					<table class="dataTable">
						<thead>
Пример #17
0
	<div  style='margin:5% 7%;'>
<?php 
$strXML = "";
$strXML = $strXML . "<graph caption='Categories and Spent percentages' xAxisName='Categories' yAxisName='Percentage' decimalPrecision='2' formatNumberScale='0'>";
$categor[0] = "ICD";
$categor[1] = "HCD";
$categor[2] = "FD";
$categor[3] = "PRD";
for ($i = 0; $i < 4; $i++) {
    $quer1 = mysql_query("select * from details where year='{$ye}' and cate_name='{$categor[$i]}'");
    $data1 = mysql_fetch_array($quer1);
    $spent_money = $data1['spent_money'];
    $alloc = $data1['alloc_money'];
    $perc = $spent_money / $alloc * 100;
    if ($categor[$i] == 'Emergency') {
        //HH
    } else {
        $strXML .= "<set name='{$categor[$i]}' value='{$perc}' color='{$Color_array[$i]}' />";
    }
}
$strXML .= "</graph>";
echo renderChartHTML("./details/charts/FCF_Column3D.swf", "", $strXML, "myNext", 800, 450);
?>
<div><br>
<!--<p  style='font-size:17px;font-weight:bold;color:#008ED6'><img src='./details/images/success.gif'>&nbsp;&nbsp;Note*: For Emergency Category <aa style='font-size:17px;font-weight:bold;color:green'>Remaining</aa>(in Emergency Category) percentage is shown</p>-->
  </div>
  </div>
  </div>
 </body>
</html>
Пример #18
0
		</fieldset>

	</div>
	<div id="right_content">
		<fieldset>
			<legend>Reports</legend>
			<b id="notification">Order Fill Rate: (Total Value Of Items Received /Total Value Of Total Items Ordered)* 100</b>
			<div class='graph>'<?php 
//Create the chart - Column 3D Chart with data from strXML variable using dataXML method
echo renderChartHTML("../Scripts/FusionWidgets/Charts/AngularGauge.swf", "", $strXML, "FactorySum", 370, 200);
echo '<br><br><br> <b id="notification">Order TAT Order Date- Appoval Date</b><br>';
echo renderChartHTML("../Scripts/FusionWidgets/Charts/HLinearGauge.swf", "", $strXML1, "Factory", 370, 100);
echo '<br><br><br> <b id="notification">Order TAT Approval Date- Dispatch Date</b><br>';
echo renderChartHTML("../Scripts/FusionWidgets/Charts/HLinearGauge.swf", "", $strXML1, "Fa1", 370, 100);
echo '<br><br><br> <b id="notification">Order TAT Dispatch Date- Delivery Date</b><br>';
echo renderChartHTML("../Scripts/FusionWidgets/Charts/HLinearGauge.swf", "", $strXML1, "Factory2", 370, 100);
?>
</div>
		</fieldset>
	</div>
	<!--<div id="full_width">
		<div class="message graph"> 
			<h2>Average Order Satisfaction %</h2>
			<p>
				
			</p>
			<div id="order_satisfaction" class="graph_container"></div>
			
		</div>
	</div>-->
	
Пример #19
0
$fillCols[3] = 'A66EDD';
$fillCols[4] = 'AFD8F8';
$i = 0;
echo '<table width="100%" cellspacing="2" cellpadding="2" border="0"><colgroup><col width="20%" /></colgroup><tbody><tr>';
foreach ($rows as $row) {
    $val = $row[1] * 1;
    $upperLimit = "1";
    for ($j = 0; $j < strlen($val); $j++) {
        $upperLimit .= "0";
    }
    $upperLimit = $upperLimit * 1;
    while ($val < $upperLimit / 2 && $upperLimit % 500 == 0) {
        $upperLimit = $upperLimit / 2;
    }
    $val = number_format($val);
    $strXML = "";
    $strXML .= "<chart palette='1' lowerLimit='0' upperLimit='{$upperLimit}' chartBottomMargin='100' cylFillColor='{$fillCols[$i]}' showValue='0' bgColor='f7f2ea' bgAlpha='100' borderThickness='0' borderColor='f7f2ea'>";
    $strXML .= "<value>{$row['1']}</value>";
    $strXML .= "<annotations>";
    $strXML .= "<annotationGroup>";
    $strXML .= "<annotation type='text' label='{$val} Unit(s)'          font='Verdana' xPos='60' yPos='190' align='center' vAlign='top' fontcolor='{$fillCols[$i]}' fontSize='10' isBold='1' wrap='1' wrapWidth='150' />";
    $strXML .= "<annotation type='text' label='{$row['0']}'                  font='Verdana' xPos='65' yPos='215' align='center' vAlign='top' fontcolor='333333'        fontSize='9'  isBold='1' wrap='1' wrapWidth='150' />";
    $strXML .= "</annotationGroup>";
    $strXML .= "</annotations>";
    $strXML .= "</chart>";
    echo '<td align="center">';
    echo renderChartHTML("../swf/Cylinder.swf", "", $strXML, "chart6_{$i}", 140, 270, false, false, "true");
    echo '</td>';
    $i++;
}
echo '</tr></tbody></table>';
Пример #20
0
<p>If you view the source of this page, you'll see that the XML data is present in this same page (inside HTML code). We're not calling any external XML (or script) files to serve XML data. dataXML method is ideal when you've to plot small amounts of data.</p>
<?php 
//This page demonstrates the ease of generating charts using FusionCharts.
//For this chart, we've used a string variable to contain our entire XML data.
//Ideally, you would generate XML data documents at run-time, after interfacing with
//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 = "<graph caption='Monthly Unit Sales' xAxisName='Month' yAxisName='Units' decimalPrecision='0' formatNumberScale='0'>";
$strXML .= "<set name='Jan' value='462' color='AFD8F8' />";
$strXML .= "<set name='Feb' value='857' color='F6BD0F' />";
$strXML .= "<set name='Mar' value='671' color='8BBA00' />";
$strXML .= "<set name='Apr' value='494' color='FF8E46'/>";
$strXML .= "<set name='May' value='761' color='008E8E'/>";
$strXML .= "<set name='Jun' value='960' color='D64646'/>";
$strXML .= "<set name='Jul' value='629' color='8E468E'/>";
$strXML .= "<set name='Aug' value='622' color='588526'/>";
$strXML .= "<set name='Sep' value='376' color='B3AA00'/>";
$strXML .= "<set name='Oct' value='494' color='008ED6'/>";
$strXML .= "<set name='Nov' value='761' color='9D080D'/>";
$strXML .= "<set name='Dec' value='960' color='A186BE'/>";
$strXML .= "</graph>";
//Create the chart - Column 3D Chart with data from strXML variable using dataXML method
echo renderChartHTML("../../FusionCharts/FCF_Column3D.swf", "", $strXML, "myNext", 600, 300, false);
?>
<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>
Пример #21
0
                <div id="content-area-inner-main">
                   
                    <div class="gen-chart-render">
					
                        <?php 
$strXML = "<chart caption='Sales for " . $year . " - Pie Chart' xAxisName='Days of the Month' yAxisName='Canadian Dollars' showValues='1' numberPrefix='\$' formatNumberScale='0' showBorder='1' rotateValues='1' placeValuesInside='1' forceYAxisValueDecimals='1'  yAxisValueDecimals='2'>";
$mon_result = mysqli_query($con, "SELECT SUBSTRING(SUBSTRING_INDEX( order_date , ' ', 1), 1, 7) AS date_month, TRUNCATE(SUM(amount+tax+shipping+service-coupon-discount+surcharge), 2) AS total\nFROM orders WHERE status_id=2 AND affiliate_id=" . $affi_cod . " GROUP BY date_month ORDER BY date_month ASC");
$z = 1;
$mo = '';
while ($mon_row = mysqli_fetch_array($mon_result)) {
    $mo = date('F', strtotime($mon_row['date_month']));
    $strXML .= "<set label='" . $mo . "' value='" . $mon_row['total'] . "' />";
    $z = $z + 1;
}
$strXML .= "</chart>";
echo renderChartHTML("http://integration.flowercrazy.com/assets/charts/Pie2D.swf", "", $strXML, "myNext", "100%", 470, false);
?>
                    </div>
                    <div class="clear"></div>
                    <p>&nbsp;</p>
                  

                    <div class="underline-dull"></div>
                </div>
            </div>
			  
			  
			  
			  
			  
			  
Пример #22
0
 function renderChart($isHTML = false)
 {
     $this->strXML = $this->getXML();
     $this->SWFFile = $this->SWFPath . "FCF_" . $this->chartSWF[$this->chartType][0] . ".swf";
     if ($this->noCache == true) {
         if ($this->chartMSG == "") {
             $this->chartMSG = "?nocache=" . microtime();
         } else {
             $this->chartMSG .= "&nocache=" . microtime();
         }
     }
     # print the charts
     if ($isHTML == false) {
         print renderChart($this->SWFFile . $this->chartMSG, "", $this->strXML, $this->chartID, $this->width, $this->height, $this->debugMode, $this->registerWithJS, $this->wMode);
     } else {
         print renderChartHTML($this->SWFFile . $this->chartMSG, "", $this->strXML, $this->chartID, $this->width, $this->height, $this->debugMode, $this->registerWithJS, $this->wMode);
     }
 }
Пример #23
0
$categor[$j] = "Engg-2";
$categor_money[$j++] = $engg_2;
$categor[$j] = "Engg-1";
$categor_money[$j++] = $engg_1;
$categor[$j] = "Puc-2";
$categor_money[$j++] = $puc_2;
$categor[$j] = "Puc-1";
$categor_money[$j++] = $puc_1;
$categor[$j] = "Total";
$categor_money[$j++] = $total_money;
for ($i = 0; $i < $j; $i++) {
    $perc = $categor_money[$i] / $total_money * 100;
    $strXML .= "<set name='{$categor[$i]}' value='{$perc}' color='{$Color_array[$i]}' />";
}
$strXML .= "</graph>";
echo '<center>', renderChartHTML("./wc/FCF_Column3D.swf", "", $strXML, "myNext", 800, 450);
?>
            </td>
        </tr>
        <tr>
        	<td colspan="3">
            Select Batch For more Details....
            </td>
            <td colspan="3">
            	<select id="selectbatch" name="batch" onChange="load_next()">
                	<option value="Select">Select</option>
                	<option value="e4">Engg-4</option>
                    <option value="e3">Engg-3</option>
                    <option value="e2">Engg-2</option>
                    <option value="e1">Engg-1</option>
                    <option value="p2">Puc-2</option>
$maxY = 10;
foreach ($last7Days as $k => $total) {
    $totalUrls = $db->getValue("SELECT COUNT(id) AS total FROM file WHERE MID(uploadedDate, 1, 7) = '" . $k . "'");
    $last7Days[$k] = (int) $totalUrls;
    if ($totalUrls > $maxY) {
        $maxY = $totalUrls;
    }
}
$strXML = "";
$strXML .= "<graph caption='" . t("dashboard_graph_last_12_months_title", "Last 12 months file uploads") . "' yAxisMinValue='" . $minY . "' yAxisMaxValue='" . $maxY . "' canvasBorderThickness='1' showValues='0' canvasBgColor='dddddd' divlinecolor='ffffff' canvasBorderColor='cccccc' rotateNames='0' animation='1' xAxisName='Month' yAxisName='" . UCWords(t("files", "files")) . "' decimalPrecision='0' formatNumberScale='0' baseFont='Arial' baseFontSize='12'>";
foreach ($last7Days as $k => $total) {
    $position = rand(0, COUNT($colours) - 1);
    $strXML .= "<set name='" . dater($k, "M") . "' value='" . $total . "' color='" . $colours[$position] . "'/>";
}
$strXML .= "</graph>";
echo renderChartHTML("admin_libraries/charts/Charts/FCF_Column2D.swf", "", $strXML, "yearChart", 600, 300);
?>
</div>

<div class="dashboardDataTable">
	<div id="dashboardOverviewTable" class="yuiTable"></div>
	<script>
	mfScripts.dashboardOverviewTable = {};
	mfScripts.dashboardOverviewTable.Data = {
		configData: [
			<?php 
$db = Database::getDatabase(true);
$formattedRow = array();
/* total active */
$totalActive = $db->getValue("SELECT COUNT(id) AS total FROM file WHERE statusId = 1");
$formattedRow[] = "{name:\"<div style='width:230px;'>" . t("dashboard_total_active_files", "Total Active Files") . "</div>\", name_value:\"" . (int) $totalActive . "\"}";
Пример #25
0
<?php

require_once "../includes/FusionCharts.php";
require_once '../includes/connect.php';
$sql = "select  coa.account_name,sum(vd.debit_amount-vd.credit_amount) Assets_Amount\n" . "from voucher_master vm\n" . "inner join voucher_detail vd on vm.voucher_id = vd.voucher_id\n" . "inner join chart_of_account coa on coa.account_code = vd.account_code\n" . "where coa.account_code like '1%'\n" . "group by coa.account_name\n" . "order by 2 desc\n" . "limit 0, 5\n";
$result = mysql_query($sql) or die("Couldn t execute query." . mysql_error());
$rows = array();
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
    $rows[] = $row;
}
$strXML = "";
$strXML .= "<chart decimals='0' numberPrefix='Rs' isHollow='0' streamlinedData='0' bgColor='f7f2ea' borderColor='f7f2ea' borderthickness='0' bgAlpha='0'>";
foreach ($rows as $row) {
    $strXML .= "<set label='{$row['0']}' value='{$row['1']}' />";
}
$strXML .= "</chart>";
echo renderChartHTML("../swf/Pyramid.swf", "", $strXML, "chart4", 400, 270, false, false, "true");