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


PHP PiePlot3D::SetCSIMTargets方法代码示例

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


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

示例1: array

require_once 'jpgraph/jpgraph.php';
require_once 'jpgraph/jpgraph_pie.php';
require_once 'jpgraph/jpgraph_pie3d.php';
//$gJpgBrandTiming=true;
// Some data
$data = array(40, 21, 17, 27, 23);
// Create the Pie Graph.
$graph = new PieGraph(400, 200, 'auto');
$graph->SetShadow();
// Set A title for the plot
$graph->title->Set("3D Pie Client side image map");
$graph->title->SetFont(FF_FONT1, FS_BOLD);
// Create
$p1 = new PiePlot3D($data);
$p1->SetLegends(array("Jan (%d)", "Feb", "Mar", "Apr", "May", "Jun", "Jul"));
$targ = array("pie3d_csimex1.php?v=1", "pie3d_csimex1.php?v=2", "pie3d_csimex1.php?v=3", "pie3d_csimex1.php?v=4", "pie3d_csimex1.php?v=5", "pie3d_csimex1.php?v=6");
$alts = array("val=%d", "val=%d", "val=%d", "val=%d", "val=%d", "val=%d");
$p1->SetCSIMTargets($targ, $alts);
// Use absolute labels
$p1->SetLabelType(1);
$p1->value->SetFormat("%d kr");
// Move the pie slightly to the left
$p1->SetCenter(0.4, 0.5);
$graph->Add($p1);
// Send back the HTML page which will call this script again
// to retrieve the image.
$graph->StrokeCSIM();
?>


开发者ID:Lazaro-Gallo,项目名称:psmn,代码行数:28,代码来源:pie3d_csimex1.php

示例2:

 //					$graph->footer->left->Set ("LogAnalyzer v" . $content['BUILDNUMBER'] . "\n" . GetAndReplaceLangStr($content['LN_STATS_GENERATEDAT'], date("Y-m-d")) );
 //					$graph->footer->left->SetFont( FF_VERA, FS_NORMAL, 8);
 //					$graph->footer->right->SetColor("darkred");
 // Show 0 label on Y-axis (default is not to show)
 $graph->yscale->ticks->SupressZeroLabel(false);
 // Set Fonts for graph!
 $graph->xaxis->SetFont(FF_VERA, FS_NORMAL, 8);
 $graph->yaxis->SetFont(FF_VERA, FS_NORMAL, 8);
 $graph->legend->SetFont(FF_VERA, FS_NORMAL, 8);
 // Create
 $p1 = new PiePlot3D($YchartData);
 $p1->SetLegends($XchartData);
 $p1->SetEdge('#333333', 1);
 $p1->SetTheme('earth');
 /*   "earth"    * "pastel"    * "sand"    * "water" */
 $p1->SetCSIMTargets($chartImageMapLinks, $chartImageMapAlts, $chartImageMapTargets);
 // Set label format
 if ($content['showpercent'] == 1) {
     $p1->SetLabelType(0);
     $p1->value->SetFormat("%d%%");
 } else {
     $p1->SetLabelType(1);
     $p1->value->SetFormat("%d");
 }
 // Set label properties
 $p1->SetLabelPos(1.0);
 $p1->SetSliceColors(array('#FFF584', '#CBFF84', '#FF6B9E', '#FF9584', '#EAFF84', '#7BFF51', '#51FFA6', '#51FF52', '#6BCFFF', '#5170FF', '#519CFF', '#EAE3AD', '#FFF184', '#8584FF', '#E698FF', '#C384FF', '#FF84EC', '#FF98A3', '#E5C285', '#FFDA98'));
 $p1->value->SetFont(FF_VERA, FS_NORMAL, 8);
 $p1->value->SetColor("black");
 // Adjust other Pie Properties
 $p1->SetLabelMargin(5);
开发者ID:czhujer,项目名称:Adiscon-LogAnalyzer,代码行数:31,代码来源:chartgenerator.php

示例3: dansguardian_buildGraph_week

function dansguardian_buildGraph_week(){
include_once(dirname(__FILE__).'/listener.graphs.php');
$sql="SELECT COUNT( sitename ) AS tcount ,TYPE FROM `dansguardian_events` WHERE YEARWEEK( zDate ) = YEARWEEK( NOW( ) ) GROUP BY TYPE ORDER BY tcount DESC LIMIT 0 , 30";
if(isset($_GET["dansguardian-stats-query"])){return dansguardian_buildGraph_by_type();}

$md5=md5($sql);


	$q=new mysql();
	$results=$q->QUERY_SQL($sql,'artica_events');
	$html="<table style='width:100%'>";
	while ($ligne = mysql_fetch_array($results)) { 
		if($ligne["TYPE"]<>null){
			$data[]=$ligne["tcount"];
			$labels[]=$ligne["TYPE"];
			$jsa="javascript:ShowGraphDansGuardianDetails('{$ligne["TYPE"]}','week');";
			$html=$html . "<tr " . CellRollOver().">
				<td width=1%><img src='img/fw_bold.gif'>
				<td><strong style='font-size:11px'>{$ligne["tcount"]}</td>
				<td><strong style='font-size:11px'><a href='#' OnClick=\"$jsa\">{$ligne["TYPE"]}</a></td>
				</tr>
				
				";
			$js[]="$jsa";
			
		}
		
	}
	
	
	
   $html=$html."</table>";
   if (!is_array($data)){
   		die("<center>".ICON_DANSGUARDIAN_STATISTICS()."</center>");
   }
   
   $tpl=new templates();

   



$p1 = new PiePlot3D($data);
$p1->SetSize(.4); 
$p1->SetAngle(75); 
$p1->SetCSIMTargets($js,$labels);
$p1->SetCenter(0.3,0.5);
$p1->ExplodeAll(10); 
$p1->SetLegends($labels);
//$p1->SetSliceColors(array('red','blue','green','navy','orange')); 

$graph = new PieGraph(470,350,'auto');
$graph->Add($p1);
$graph->title->Set("Week");
$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->legend->Pos(0,0,'right','top');
$graph->legend->SetFillColor('white'); 
$graph->legend->SetLineWeight(0);
//$graph->legend->SetLayout(LEGEND_HOR); //hori 
$graph->legend->SetColor('black'); 
$graph->legend->SetShadow("white",0); 
$graph->SetFrame(false); 
if(function_exists("imageantialias")){$graph->img->SetAntiAliasing();}
$mapName = 'MapName';
$imgMap = $graph->GetHTMLImageMap($mapName); 
$graph->Stroke("ressources/logs/$md5.png");

$html=  "
<table style='width:100%'>

<tr>
	<td valign='top'>
$imgMap
".RoundedLightWhite("
<img src='ressources/logs/$md5.png' alt='graph' ismap usemap='#$mapName' border='0'>")."
</td>
<td valign='top'>".RoundedLightWhite($html)."</td>
</tr>
</table>

";


return $html;

	
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:87,代码来源:squid.newbee.php

示例4: formatPercentage

}
$legends = array();
foreach ($labels as $currentKey => $currentLabel) {
    $legends[] = $currentLabel . ' - ' . $amounts[$currentKey]->getFormatted();
}
$targets = array();
foreach ($labels as $currentId => $currentLabel) {
    if ($currentId != 'none' && $currentId != 'other') {
        $targets[] = 'javascript:reachThroughCategory(\'' . substr($currentId, 1) . '\');';
    } else {
        $targets[] = '';
    }
}
$pie = new PiePlot3D($data);
$pie->SetLegends($legends);
$pie->SetCSIMTargets($targets, $dataNames);
$pie->value->SetFont(FF_VERA);
$pie->value->SetFormatCallback('formatPercentage');
$pie->SetCenter(0.33, 0.5);
//$pie->SetSliceColors($chartColors);
$graph->Add($pie);
$graph->legend->SetFont(FF_VERA);
$graph->legend->SetPos(0.03, 0.05);
$graph->SetMargin(10, 10, 10, 10);
$graph->SetShadow();
$graph->SetAntiAliasing();
$graph->StrokeCSIM(basename(__FILE__));
require_once BADGER_ROOT . "/includes/fileFooter.php";
function formatPercentage($val)
{
    global $us;
开发者ID:BackupTheBerlios,项目名称:badger-svn,代码行数:31,代码来源:category.php


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