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


PHP SendChartData函数代码示例

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


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

示例1: pie_single_quarantine

function pie_single_quarantine()
{
    $tpl = new Templates();
    $USER_QUARANTINE = $_GET["USER_QUARANTINE"];
    $SAFE = $_GET["SAFE"];
    $title = $tpl->_ENGINE_parse_body("{quarantines_graph}");
    $date = date('Y-m-d');
    $textes = array();
    $donnees = array();
    $zlabel = array();
    $date = date('Y-m-d');
    $textes[] = 'title';
    $donnees[] = '';
    $donnees[] = $SAFE;
    $textes[] = "Sended";
    $donnees[] = $USER_QUARANTINE;
    $textes[] = "Quarantine";
    $chart['axis_value'] = array('bold' => false, 'size' => 8);
    $chart['axis_category'] = array('skip' => 1, 'font' => "Tahoma", 'bold' => true, 'size' => 8, 'color' => "000000", 'alpha' => 75, 'orientation' => "horizontal");
    $chart['legend_label'] = array('layout' => 'vertical', 'bullet' => 'square', 'font' => 'Arial', 'bold' => true, 'size' => 11, 'color' => "000000", 'alpha' => 90);
    $chart['chart_type'] = "3d pie";
    $chart['chart_pref'] = array('line_thickness' => 2, 'point_shape' => "none", 'fill_shape' => true);
    $chart['chart_data'] = array($textes, $donnees);
    //$chart [ 'live_update' ] =  array ( 'url'=>"statistiques-generator.php?articles-jour=yes", 'delay'=>30 );
    $chart['series_color'] = array('005447', '009D86', 'ddaa41', 'A4781E', '88dd11', '634812', '4e62dd', 'ff8811', '4d4d4d', '5a4b6e', 'C60000', 'FF3333', 'FF0099', 'DFDF00');
    $chart["series_explode"] = array(10, 10, 10);
    $chart["chart_value"] = array('color' => 'ffffff', 'alpha' => '90', 'font' => 'arial', 'bold' => 'true', 'size' => '10', 'position' => 'inside', 'prefix' => '', 'suffix' => '', 'decimals' => '0', 'separator' => '');
    $chart["legend_label"] = array('layout' => 'vertical', 'bullet' => 'circle', 'font' => 'arial', 'bold' => 'true', 'size' => '11', 'color' => '005447', 'alpha' => '85');
    $chart['chart_transition'] = array('type' => 'dissolve', 'delay' => 0, 'duration' => 0.5, 'order' => 'all');
    SendChartData($chart);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:31,代码来源:listener.graphs.php

示例2: showChart

function showChart($chart, $chartWidth, $chartHeight)
{
    $database = DB::getInstance();
    $db = $database->getConnection();
    $reg_key = "C1XUW9CU8Y4L.NS5T4Q79KLYCK07EK";
    $chart_xml = SendChartData($chart);
    $mysql['chart_xml'] = $db->real_escape_string($chart_xml);
    $chart_sql = "INSERT INTO 202_charts SET chart_xml='" . $mysql['chart_xml'] . "'";
    $chart_result = _mysqli_query($chart_sql);
    //($chart_sql);
    $chart_id = $db->insert_id;
    $url['chart_id'] = urlencode($chart_id);
    if (!isset($_COOKIE['hideChartUpgrade'])) {
        echo '<div class="modal fade" id="chartsUpgradeModal" tabindex="-1" role="dialog" aria-labelledby="chartsUpgradeModalLabel" aria-hidden="true">
				<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
		        		<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
		        		<h4 class="modal-title" id="chartsUpgradeModalLabel">NEW HTML5 charts</h4>
		      		</div>
		      		<div class="modal-body">
		        		<img src="/202-img/chart.png" style="width: 100%;">
		      		</div>
		      		<div class="modal-footer">
		        		<a href="http://click202.com/tracking202/redirect/dl.php?t202id=8151295&t202kw=graph" target="_blank" class="btn btn-p202">This is a Prosper202 Pro Feature: Upgrade Now To Access!</a>
		      		</div>
		    	</div>
				</div>
		</div>';
        echo '<script>$("#chartsUpgradeModal").modal();</script>';
    }
    echo InsertChart('/202-charts/charts.swf', '/202-charts/charts_library', '/202-charts/showChart.php?chart_id=' . $url['chart_id'], $chartWidth, $chartHeight, 'FFFFFF', false, $reg_key);
}
开发者ID:viasmonster,项目名称:prosper202,代码行数:33,代码来源:functions-tracking202.php

示例3: dirname

<?php

include dirname(__FILE__) . "/../lib/charts/charts.php";
$chart['chart_type'] = $_GET['display'];
$chart['live_update'] = array('url' => str_replace('update.php', $_GET['chart'] . '.php', $_SERVER['REQUEST_URI']));
SendChartData($chart);
开发者ID:slaFFik,项目名称:l10n-ru,代码行数:6,代码来源:update.php

示例4: SendChartData

 /**
  * Calls the Chart, SendChartData() function and exits    
  */
 protected function SendChartData()
 {
     $err = array();
     while (ob_get_length() !== false) {
         if (!($out = ob_get_clean())) {
             continue;
         }
         $err[] = $out;
     }
     if (count($err) > 0) {
         I2CE::raiseError("Suppresed error(s) while generating flash:\n" . implode("\n", $err));
     }
     SendChartData($this->chart);
     exit;
 }
开发者ID:apelon-ohie,项目名称:ihris-site,代码行数:18,代码来源:I2CE_CustomReport_Display_PieChart.php

示例5: showCategoryData

function showCategoryData()
{
    global $badgerDb;
    global $logger;
    $logger->log('showCategoryData: REQUEST_URI: ' . $_SERVER['REQUEST_URI']);
    if (!isset($_GET['accounts']) || !isset($_GET['startDate']) || !isset($_GET['endDate']) || !isset($_GET['type']) || !isset($_GET['summarize'])) {
        throw new BadgerException('statistics', 'missingParameter');
    }
    $accounts = explode(';', $_GET['accounts']);
    foreach ($accounts as $key => $val) {
        settype($accounts[$key], 'integer');
    }
    $startDate = new Date($_GET['startDate']);
    $endDate = new Date($_GET['endDate']);
    $type = $_GET['type'];
    if ($type !== 'o') {
        $type = 'i';
    }
    if ($_GET['summarize'] !== 't') {
        $summarize = false;
    } else {
        $summarize = true;
    }
    $categories = gatherCategories($accounts, $startDate, $endDate, $type, $summarize);
    $sum = new Amount();
    foreach ($categories as $currentCategory) {
        $sum->add($currentCategory['amount']);
    }
    $chart = array();
    //for documentation for the following code see: http://www.maani.us/charts/index.php?menu=Reference
    $chart['chart_type'] = '3d pie';
    $chart['axis_category'] = array('skip' => 0, 'font' => "Arial", 'bold' => false, 'size' => 10, 'color' => "000000", 'alpha' => 100, 'orientation' => "horizontal");
    $chart['chart_rect'] = array('x' => 150, 'y' => 50, 'width' => 500, 'height' => 250, 'positive_color' => "ffffff", 'negative_color' => "000000", 'positive_alpha' => 0, 'negative_alpha' => 0);
    $chart['chart_value'] = array('prefix' => "", 'suffix' => "", 'decimals' => 0, 'decimal_char' => ".", 'separator' => "", 'position' => "outside", 'hide_zero' => true, 'as_percentage' => false, 'font' => "Arial", 'bold' => false, 'size' => 10, 'color' => "000000", 'alpha' => 90);
    $chart['chart_transition'] = array('type' => "none", 'delay' => 1, 'duration' => 1, 'order' => "all");
    $chart['legend_rect'] = array('x' => 700, 'y' => 400, 'width' => 0, 'height' => 0, 'margin' => 5, 'fill_color' => "FFFFFF", 'fill_alpha' => 100, 'line_color' => "000000", 'line_alpha' => 100, 'line_thickness' => 1);
    $chart['legend_label'] = array('layout' => "vertical", 'bullet' => "circle", 'font' => "Arial", 'bold' => false, 'size' => 11, 'color' => "000000", 'alpha' => 90);
    $chart['legend_transition'] = array('type' => "none", 'delay' => 1, 'duration' => 1);
    $chart['series_color'] = array('000070', 'FFFF99', '007000', 'FFCC99', '700070', 'CC99FF', '660000', '9999FF', '006666', 'CCFF99', 'A35200', 'FFCA7A');
    $chart['chart_data'] = array();
    $chart['chart_value_text'] = array();
    $chart['chart_data'][0][0] = '';
    $chart['chart_data'][1][0] = '';
    $chart['chart_value_text'][0][0] = '';
    $chart['chart_value_text'][1][0] = '';
    foreach ($categories as $key => $val) {
        $chart['chart_data'][0][] = utf8_encode($val['title']);
        $chart['chart_value_text'][0][] = null;
        if ($type == 'i') {
            $chart['chart_data'][1][] = $val['amount']->get();
        } else {
            $chart['chart_data'][1][] = $val['amount']->mul(-1)->get();
        }
        $chart['chart_value_text'][1][] = utf8_encode($val['title'] . "\n" . $val['amount']->getFormatted() . "\n" . round($val['amount']->div($sum)->mul($type == 'i' ? 100 : -100)->get(), 2) . ' %');
    }
    SendChartData($chart);
}
开发者ID:BackupTheBerlios,项目名称:badger-svn,代码行数:57,代码来源:statistics.php

示例6: SendChartData

<?php

//include charts.php to access the SendChartData function
require_once BADGER_ROOT . "/includes/charts/charts.php";
SendChartData();
开发者ID:BackupTheBerlios,项目名称:badger-svn,代码行数:5,代码来源:chartTestData.php

示例7: define

<?php

define("BADGER_ROOT", "../..");
//include charts.php to access the SendChartData function
require_once BADGER_ROOT . "/includes/charts/charts.php";
//change the chart to a bar chart
$linechart['chart_type'] = "line";
SendChartData($linechart);
开发者ID:BackupTheBerlios,项目名称:badger-svn,代码行数:8,代码来源:chartTestLine.php

示例8: Process

 /**
  * Process
  * Does all of the work. Includes the chart, works out the data, prints it out.
  *
  * @return void
  */
 function Process()
 {
     $session =& GetSession();
     $thisuser = $session->Get('UserDetails');
     $this->CalculateCalendarRestrictions();
     $this->GetSearchUser();
     $ignoreips = $this->GetIgnoreDetails();
     $ignorereferrers = $this->GetIgnoreDetails('Referrers');
     $ignorekeywords = $this->GetIgnoreDetails('Keywords');
     // http://www.maani.us/charts/index.php?menu=Reference&submenu=chart_value
     include dirname(__FILE__) . '/charts/charts.php';
     $chart['chart_type'] = 'column';
     $chart['series_switch'] = true;
     //hide the legend
     $chart['legend_rect'] = array('x' => -1000, 'y' => -1000);
     $chart['chart_data'] = array();
     $chart['chart_data'][0][0] = '';
     $graph_choice = $thisuser->GetSettings('GraphChoice');
     // since getsettings returns an array by default, we have to check for it.
     // if it's an array or if it's empty, then we'll set it to the default (revenue).
     // this will get set properly if/when the choice is changed.
     if (is_array($graph_choice) || !$graph_choice) {
         $graph_choice = '';
     }
     switch (strtolower($graph_choice)) {
         case 'visits':
             $prefix = '';
             $chart_title = GetLang('Chart_Title_Visits');
             $chart_value = $graph_choice;
             $chart_data = GetLang(ucwords($chart_value));
             break;
         case 'conversions':
             $prefix = '';
             $chart_title = GetLang('Chart_Title_Conversions');
             $chart_value = $graph_choice;
             $chart_data = GetLang(ucwords($chart_value));
             break;
         default:
             $prefix = GetLang('CurrencySymbol');
             $chart_title = GetLang('Chart_Title') . " (" . GetLang('CurrencySymbol') . ")";
             $chart_value = 'revenue';
             $chart_data = GetLang(ucwords($chart_value));
             break;
     }
     $count = 1;
     foreach ($this->ExportTypes as $p => $type) {
         $chart['chart_data'][0][] = GetLang($type);
         $chart['chart_data'][1][] = $chart_data;
         if ($type == 'campaign' || $type == 'ppc') {
             $qry = "SELECT COUNT(" . $this->ExportDbInfo[$type]['key'] . ") AS visits, SUM(amount) AS revenue, SUM(hasconversion) AS conversions, SUM(cost) AS cost, (SUM(amount) / SUM(cost)*100) AS roi FROM " . TRACKPOINT_TABLEPREFIX . $this->ExportDbInfo[$type]['table'] . " WHERE " . $this->SearchUserID . ($this->CalendarRestrictions ? ' AND ' . $this->CalendarRestrictions : '');
             if ($ignoreips) {
                 $qry .= " AND " . $ignoreips;
             }
         } else {
             $qry = "SELECT COUNT(" . $this->ExportDbInfo[$type]['key'] . ") AS visits, SUM(amount) AS revenue, SUM(hasconversion) AS conversions FROM " . TRACKPOINT_TABLEPREFIX . $this->ExportDbInfo[$type]['table'] . " WHERE " . $this->SearchUserID . ($this->CalendarRestrictions ? ' AND ' . $this->CalendarRestrictions : '');
             if ($ignoreips) {
                 $qry .= " AND " . $ignoreips;
             }
             if ($type == 'referrer') {
                 if ($ignorereferrers) {
                     $qry .= " AND " . $ignorereferrers;
                 }
             }
             if ($type == 'search') {
                 if ($ignorekeywords) {
                     $qry .= " AND " . $ignorekeywords;
                 }
             }
         }
         $result = $this->Db->Query($qry);
         $row = $this->Db->Fetch($result);
         $chart['chart_data'][1][$count] = $row[$chart_value];
         $chart['chart_value_text'][2][$count] = $this->FormatNumber($row[$chart_value], 2);
         $count++;
     }
     $chart['chart_value'] = array('prefix' => $prefix, 'decimals' => 2, 'decimal_char' => GetLang('NumberFormat_Dec'), 'separator' => GetLang('NumberFormat_Thousands'), 'color' => 'FFFFFF', 'bold' => false, 'position' => 'inside', 'hide_zero' => true);
     $chart['chart_bg'] = array('positive_color' => "000000", 'positive_alpha' => 0, 'negative_color' => "FFFFFF", 'negative_alpha' => 0);
     $chart['chart_grid_h'] = array('thickness' => 1);
     $chart['chart_grid_v'] = array('thickness' => 1);
     $chart['draw_text'] = array(array('x' => 0, 'y' => 0, 'width' => 400, 'height' => 40, 'h_align' => 'center', 'v_align' => 'top', 'text' => $chart_title, 'color' => '000000', 'size' => 11, 'alpha' => 100));
     $chart['series_color'] = array("E74D00", "FFBE21", "84B221", "6379AD");
     SendChartData($chart);
 }
开发者ID:juliogallardo1326,项目名称:proc,代码行数:89,代码来源:tpchart.php

示例9: showChart

function showChart($chart, $chartWidth, $chartHeight)
{
    $reg_key = "C1XUW9CU8Y4L.NS5T4Q79KLYCK07EK";
    $chart_xml = SendChartData($chart);
    $mysql['chart_xml'] = mysql_real_escape_string($chart_xml);
    $chart_sql = "INSERT INTO 202_charts SET chart_xml='" . $mysql['chart_xml'] . "'";
    $chart_result = _mysql_query($chart_sql);
    //($chart_sql);
    $chart_id = mysql_insert_id();
    $url['chart_id'] = urlencode($chart_id);
    echo InsertChart('/xtracks-charts/charts.swf', '/xtracks-charts/charts_library', '/xtracks-charts/showChart.php?chart_id=' . $url['chart_id'], $chartWidth, $chartHeight, 'FFFFFF', false, $reg_key);
}
开发者ID:ClickBooth,项目名称:XTracks,代码行数:12,代码来源:functions-tracking202.php

示例10: Process


//.........这里部分代码省略.........
				} else {
					$chart_title = GetLang($chart_area . '_Summary_Graph');
				}

				if ($opens == 0 && $bounces == 0 && $unopened == 0) {
					$unopened = 1;
				}

				$total = $opens + $unopened + $bounces;

				$opens_percent = $unopened_percent = $bounces_percent = 0;

				if ($total > 0) {
					$opens_percent = $this->FormatNumber(($opens / $total) * 100);
					$unopened_percent = $this->FormatNumber(($unopened / $total) * 100);
					$bounces_percent = $this->FormatNumber(($bounces / $total) * 100);
				}

				$this->chart['chart_data'][0][1] = sprintf(GetLang('Summary_Graph_Opened'), $opens_percent);
				$this->chart['chart_data'][0][2] = sprintf(GetLang('Summary_Graph_Unopened'), $unopened_percent);
				$this->chart['chart_data'][0][3] = sprintf(GetLang('Summary_Graph_Bounced'), $bounces_percent);

				$this->chart['chart_data'][1][1] = $opens;
				$this->chart['chart_data'][1][2] = $unopened;
				$this->chart['chart_data'][1][3] = $bounces;

				if ($opens == 0 && $unopened == 0 && $bounces == 0) {
					$this->chart['chart_type'] = 'column';
				}

				$opens_percent = $opens / 100;

				$this->chart['chart_value_text'][1][1] = $this->FormatNumber($opens);
				$this->chart['chart_value_text'][1][2] = $this->FormatNumber($unopened);
				$this->chart['chart_value_text'][1][3] = $this->FormatNumber($bounces);

		}

		if ($chart_type) {
			$chart_title = GetLang($chart_area . '_Summary_Graph_' . $chart_type);

			$this->SetupChartDates($chart_type);
			$listid = 0;
			if (isset($_GET['Area']) && $_GET['Area'] == 'list' && isset($_GET['statid'])) {
				$listid = (int)$_GET['statid'];
			}
			if (isset($_GET['List'])) {
				$listid = (int)$_GET['List'];
			}

			switch ($chart_type) {
				case 'bouncechart':
					$data = $this->stats_api->GetBounceGraphData($this->stats_api->stats_type, $restrictions, $statid, $listid);
					$this->SetupChart_BounceSummary($data);
				break;

				case 'subscribersummary':
					if (isset($_GET['i']) && $_GET['i'] == 1) {
						$data = IEM::sessionGet('IndexSubscriberGraphData');
					} else {
						$data = IEM::sessionGet('SubscriberGraphData');
					}

					$this->SetupChart_SubscriberSummary($data);
				break;

				case 'userchart':
					$data = IEM::sessionGet('userchart_data');
					$this->SetupChart($data);
				break;

				default:
					$data = $this->stats_api->GetGraphData($statid, $this->stats_api->stats_type, $restrictions, $chart_type, $listid);
					$this->SetupChart($data);
				break;
			}
		}

		// Prints the chart as a gif or png
		if (isset($_GET['GetAsImg'])) {
			// graphpite causes lots of notices and warning, so turn those off
			error_reporting(E_PARSE | E_ERROR);

			// Turn off error handling, it breaks the chart generation
			set_error_handler('ord');

			require_once(dirname(__FILE__) . "/amcharts/graphpite.php");
			// Width & height are fixed at 650x300 for printing
			$chart_image = new Chart_Image(650,300,$chart_title);
			$chart_image->Generate($this->chart);
			$chart_image->PrintImage();

			// Restore error handling
			error_reporting(E_ALL);
			restore_error_handler();
		} else {
			// gets chart data as xml for amcharts
			SendChartData($this->chart);
		}
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:101,代码来源:stats_chart.php


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