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


PHP PiePlot3D::SetSize方法代码示例

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


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

示例1: PieChart

function PieChart($w, $h, $title, $data, $dataL, $output)
{
    $graph = new PieGraph($w, $h, "auto");
    $graph->SetFrame(false);
    $graph->SetShadow(false);
    $graph->title->Set($title);
    $graph->title->SetFont(FF_FONT1, FS_BOLD);
    $p1 = new PiePlot3D($data);
    $p1->SetAngle(20);
    $p1->SetSize(0.5);
    $p1->SetCenter(0.45);
    $p1->SetLegends($dataL);
    $graph->Add($p1);
    $graph->Stroke($output);
}
开发者ID:anggadjava,项目名称:mitra_siakad,代码行数:15,代码来源:pmblap.aplikan.cetak.php

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

示例3: count

//生成二维数组
$rows_count = count($res);
//声明数组
$arraynum0 = array();
$arraycip0 = array();
//解析数组
for ($i = 0; $i < $rows_count; $i++) {
    array_push($arraynum0, $res[$i][num]);
    array_push($arraycip0, $res[$i][cip]);
}
/*************************************************************/
//创建画布
$graph = new PieGraph(990, 276);
$graph->SetShadow();
//设置标题名称
$graph->title->Set("应用3D饼形图统计分析全部区域许愿比率");
$graph->title->SetFont(FF_SIMSUN, FS_BOLD);
$graph->legend->SetFont(FF_SIMSUN, FS_NORMAL);
$size = 0.5;
/***********************统计全部许愿比率*************************/
//创建饼形图对象
$p0 = new PiePlot3D($arraynum0);
$p0->SetLegends($arraycip0);
$p0->SetSize($size);
$p0->SetCenter(0.45, 0.48);
$p0->SetLegends($arraycip0);
$p0->value->SetFont(FF_FONT0);
$p0->title->SetFont(FF_SIMSUN, FS_BOLD);
/*************************************************************/
$graph->Add($p0);
$graph->Stroke();
开发者ID:Arrray,项目名称:PHPpractice,代码行数:31,代码来源:statistic_all.php

示例4: PieGraph

         it under the terms of the GNU General Public License as published by
         the Free Software Foundation; either version 2 of the License, or
         (at your option) any later version.

         OCOMON is distributed in the hope that it will be useful,
         but WITHOUT ANY WARRANTY; without even the implied warranty of
         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
         GNU General Public License for more details.

         You should have received a copy of the GNU General Public License
         along with Foobar; if not, write to the Free Software
         Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
session_start();
include "../../includes/jpgraph/src/jpgraph.php";
include "../../includes/jpgraph/src/jpgraph_pie.php";
include "../../includes/jpgraph/src/jpgraph_pie3d.php";
$graph = new PieGraph(800, 500, "auto");
$graph->SetShadow();
$graph->SetAntiAliasing();
//$titulo=$titulo.$instituicao;
$graph->title->Set($_GET['titulo']);
$graph->subtitle->Set($_GET['instituicao']);
$graph->title->SetFont(FF_FONT1, FS_BOLD);
$p1 = new PiePlot3D($_GET['data']);
$p1->ExplodeAll();
$p1->SetSize(0.45);
$p1->SetCenter(0.35);
$p1->SetLegends($_GET['legenda']);
$graph->Add($p1);
$graph->Stroke();
开发者ID:GeorgeAlexandre,项目名称:yipservicedesk,代码行数:31,代码来源:graph_geral_pizza.php

示例5: count

$res5 = $DB->get_rows_array($sql5);
//生成二维数组
$rows_count5 = count($res5);
//声明数组
$arraynum5 = array();
$arraycip5 = array();
//解析数组
for ($n = 0; $n < $rows_count5; $n++) {
    array_push($arraynum5, $res5[$n][num]);
    array_push($arraycip5, $res5[$n][cip]);
}
/*************************************************************/
//创建画布
$graph = new PieGraph(320, 246);
$graph->SetShadow();
//设置标题名称
$graph->title->Set("统计分析全部区域的[ 奥运会 ] 许愿比率");
$graph->title->SetFont(FF_SIMSUN, FS_BOLD);
$graph->legend->SetFont(FF_SIMSUN, FS_NORMAL);
$size = 0.3;
/***********************统计奥运会许愿比率*************************/
//创建饼形图对象
$p = new PiePlot3D($arraynum5);
$p->SetLegends($arraycip5);
$p->SetSize($size);
$p->SetCenter(0.45, 0.55);
$p->value->SetFont(FF_FONT0);
$p->title->SetFont(FF_SIMSUN, FS_BOLD);
/*************************************************************/
$graph->Add($p);
$graph->Stroke();
开发者ID:Arrray,项目名称:PHPpractice,代码行数:31,代码来源:statistic_olympic.php

示例6: array

// Some data
$data = array();
$i = 0;
$username = "holly123";
$selectPieGraph = "select SUM(total_Steps), SUM(total_Calories), SUM(total_Floors), SUM(total_Distance) from Data where (username = '{$username}')";
$result = mysqli_query($connection, "{$selectPieGraph}");
while ($row = mysqli_fetch_array($result)) {
    $data[0] = $row["SUM(total_Steps)"];
    $data[1] = $row["SUM(total_Calories)"];
    $data[2] = $row["SUM(total_Floors)"];
    $data[3] = $row["SUM(total_Distance)"];
}
// Create the Pie Graph.
$graph = new PieGraph(300, 300);
$theme_class = new VividTheme();
$graph->SetTheme($theme_class);
// Set A title for the plot
$graph->title->Set("Breakdown of holly123's exercise");
// Create
$p1 = new PiePlot3D($data);
$p1->SetLegends(array("Steps", "Floors", "Calories", "Distance"));
$p1->SetCenter(0.5, 0.55);
$p1->SetSize(0.3);
$p1->SetLabelType(PIE_VALUE_PER);
$p1->value->show();
$p1->value->SetFont(FF_FONT0, FS_NORMAL, 12);
$graph->Add($p1);
$p1->ShowBorder();
$p1->SetColor('black');
//$p1->ExplodeSlice(1);
$graph->Stroke();
开发者ID:jwatphisit,项目名称:Web2,代码行数:31,代码来源:barPie.php

示例7: crearPie

function crearPie($pdf, $verde, $rojo, $ciclos, $alineacion)
{
    $data = array($verde, $rojo);
    $labels = array("Valores\ndentro de\nnorma\n(%.1f%%)", "Valores\nfuera de\nnorma\n(%.1f%%)");
    $graph = new PieGraph(310, 200);
    $graph->SetShadow();
    $graph->title->Set(utf8_decode("Análisis de resultados " . $ciclos));
    $graph->title->SetFont(FF_FONT1, FS_BOLD);
    $p1 = new PiePlot3D($data);
    $p1->SetSize(0.5);
    $p1->SetCenter(0.5);
    $p1->ExplodeAll(15);
    $p1->SetStartAngle(60);
    $p1->SetLabels($labels);
    $p1->SetLabelPos(0);
    $p1->value->SetColor('black');
    $graph->Add($p1);
    $p1->SetSliceColors(array('green', 'red'));
    //$graph->Stroke();
    $nombreImagen = '' . uniqid() . '.png';
    // Display the graph
    $graph->Stroke($nombreImagen);
    if ($alineacion === 'C') {
        $pdf->Image($nombreImagen, 145, 145, 55, 45);
    } elseif ($alineacion === 'L') {
        $pdf->Image($nombreImagen, 90, 145, 55, 45);
    } elseif ($alineacion === 'R') {
        $pdf->Image($nombreImagen, 195, 145, 55, 45);
    } elseif ($alineacion === 'C1') {
        $pdf->Image($nombreImagen, 75, 205, 55, 45);
    } elseif ($alineacion === 'L1') {
        $pdf->Image($nombreImagen, 20, 205, 55, 45);
    } elseif ($alineacion === 'R1') {
        $pdf->Image($nombreImagen, 125, 205, 55, 45);
    } elseif ($alineacion === 'C2') {
        $pdf->Image($nombreImagen, 75, 160, 55, 45);
    }
    unlink($nombreImagen);
}
开发者ID:jmoreno0118,项目名称:Microv2,代码行数:39,代码来源:index.php

示例8: PieGraph

    }
}
//
require_once 'ossim_conf.inc';
$conf = $GLOBALS["CONF"];
$jpgraph = $conf->get_conf("jpgraph_path");
require_once "{$jpgraph}/jpgraph.php";
require_once "{$jpgraph}/jpgraph_pie.php";
require_once "{$jpgraph}/jpgraph_pie3d.php";
// Setup the graph.
$graph = new PieGraph(400, 150, "auto");
$graph->SetAntiAliasing();
$graph->SetColor("#fafafa");
$graph->SetFrame(true, '#fafafa', 0);
if (isset($temp_activado)) {
    // Create the bar plots
    $piePlot3d = new PiePlot3D($data['value']);
    $piePlot3d->SetSliceColors(array(COLORPIE1, COLORPIE2, COLORPIE3, COLORPIE4, COLORPIE5, COLORPIE6, COLORPIE7, COLORPIE8));
    //$piePlot3d->SetAngle(30);
    $piePlot3d->SetHeight(12);
    $piePlot3d->SetSize(0.5);
    $piePlot3d->SetCenter(0.26, 0.4);
    // Labels
    //$piePlot3d->SetLabels($data['title'],1);
    $piePlot3d->SetLegends($data['title']);
    $graph->Add($piePlot3d);
    $graph->legend->SetPos(0.01, 0.6, 'right', 'bottom');
}
// Finally send the graph to the browser
$graph->Stroke();
unset($graph);
开发者ID:AntBean,项目名称:alienvault-ossim,代码行数:31,代码来源:CIAPotentialImpactsRisksPie1.php

示例9: PiePlot

 if ($options['graph_pie_antialiasing']) {
     $graph->SetAntiAliasing();
 }
 // Setup graph title
 $graph->title->Set($data['title']);
 $graph->title->SetFont(FF_FONT1, FS_BOLD);
 // Create pie plot
 if ($options['graph_pie_3dangle'] == 0) {
     $plot = new PiePlot($data['values']);
 } else {
     $plot = new PiePlot3D($data['values']);
     $plot->setAngle($options['graph_pie_3dangle']);
 }
 //$plot->SetFont(FF_VERDANA,FS_BOLD);
 //$plot->SetFontColor("darkred");
 $plot->SetSize(0.3);
 $plot->setCenter($options['graph_pie_center']);
 if (count($data['legend'] > 10)) {
     $i = 0;
     foreach ($data['legend'] as $key => $val) {
         if ($i > 10) {
             unset($data['legend'][$key]);
         }
         $i++;
     }
 }
 $plot->SetLegends($data['legend']);
 $plot->setTheme($options['graph_pie_theme']);
 if ($options['graph_plotshadow']) {
     $plot->SetShadow();
 }
开发者ID:jhbsz,项目名称:ossimTest,代码行数:31,代码来源:custom_graph.php

示例10: PieGraph

        // si todos los valores están a 0, el piegraph da el siguiente error 'Illegal pie plot. Sum of all data is zero for pie plot'
        $temp_activado = true;
    }
}
//
require_once 'ossim_conf.inc';
$conf = $GLOBALS["CONF"];
$jpgraph = $conf->get_conf("jpgraph_path");
require_once "{$jpgraph}/jpgraph.php";
require_once "{$jpgraph}/jpgraph_pie.php";
require_once "{$jpgraph}/jpgraph_pie3d.php";
// Setup the graph.
$graph = new PieGraph(350, 150, "auto");
$graph->SetAntiAliasing();
$graph->SetColor("#fafafa");
$graph->SetFrame(true, '#fafafa', 0);
if (isset($temp_activado)) {
    // Create the bar plots
    $piePlot3d = new PiePlot3D($dataValue1);
    $piePlot3d->SetSliceColors(array(COLORPIE1, COLORPIE2, COLORPIE3, COLORPIE4, COLORPIE5, COLORPIE6, COLORPIE7, COLORPIE8));
    //$piePlot3d->SetAngle(30);
    $piePlot3d->SetHeight(12);
    $piePlot3d->SetSize(0.3);
    $piePlot3d->SetCenter(0.5, 0.3);
    // Labels
    $piePlot3d->SetLabels(array($groupTit1, $groupTit2), 1);
    $graph->Add($piePlot3d);
}
// Finally send the graph to the browser
$graph->Stroke();
unset($graph);
开发者ID:AntBean,项目名称:alienvault-ossim,代码行数:31,代码来源:ThreatOverviewPie1.php

示例11: array

// content="text/plain; charset=utf-8"
require_once '../../vendor/autoload.php';
\JpGraph\JpGraph::load();
\JpGraph\JpGraph::module('pie');
\JpGraph\JpGraph::module('pie3d');
// Some data
$data = array(20, 27, 45, 75, 90);
// Create the Pie Graph.
$graph = new \PieGraph(350, 200);
$graph->SetShadow();
// Set A title for the plot
$graph->title->Set("Example 3 3D Pie plot");
$graph->title->SetFont(FF_VERDANA, FS_BOLD, 18);
$graph->title->SetColor("darkblue");
$graph->legend->Pos(0.1, 0.2);
// Create 3D pie plot
$p1 = new \PiePlot3D($data);
$p1->SetTheme("sand");
$p1->SetCenter(0.4);
$p1->SetSize(80);
// Adjust projection angle
$p1->SetAngle(45);
// As a shortcut you can easily explode one numbered slice with
$p1->ExplodeSlice(3);
// Setup the slice values
$p1->value->SetFont(FF_ARIAL, FS_BOLD, 11);
$p1->value->SetColor("navy");
$p1->SetLegends(array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct"));
$graph->Add($p1);
$graph->Stroke();
开发者ID:amenadiel,项目名称:jpgraph,代码行数:30,代码来源:pie3dex3.php

示例12: array

require "../../conexion.php";
$datos_genero = array();
$datos_puntaje = array();
$generos = "SELECT SUM(visitas),genero FROM juegos RIGHT JOIN genero_juego ON(juegos.id_genero=genero_juego.id_genero) GROUP BY genero\n";
$resultado_genero = mysql_query($generos) or die("Error" . $generos);
while ($array_generos = mysql_fetch_array($resultado_genero)) {
    array_push($datos_genero, $array_generos['genero']);
    array_push($datos_puntaje, $array_generos['0']);
}
//print_r($datos_genero);
//print_r($datos_puntaje);
//$data = array(40,60,21,33);
$graph = new PieGraph(450, 200, "auto");
$graph->img->SetAntiAliasing();
$graph->SetMarginColor('gray');
//$graph->SetShadow();
// Setup margin and titles
$graph->title->Set("Cantidad de visitas según género");
$p1 = new PiePlot3D($datos_puntaje);
$p1->SetSize(0.35);
$p1->SetCenter(0.5);
// Setup slice labels and move them into the plot
$p1->value->SetFont(FF_FONT1, FS_BOLD);
$p1->value->SetColor("black");
$p1->SetLabelPos(0.2);
//$nombres=array("pepe","luis","miguel","alberto");
$p1->SetLegends($datos_genero);
// Explode all slices
$p1->ExplodeAll();
$graph->Add($p1);
$graph->Stroke();
开发者ID:juanch0x,项目名称:bda,代码行数:31,代码来源:generador_visitas_grafico.php

示例13:

    if (isset($host[$y])) {
        array_push($targ, $_SERVER["PHP_SELF"] . "?pageId=Search&slice=1&table={$table}&excludeHost=0&host2=&host%5B%5D={$host[$y]}&excludeFacility=1&excludePriority=1&date={$date}&time=&date2={$date2}&time2=&limit=100&orderby=datetime&order=DESC&msg1=&msg2=&msg3=&collapse=1");
    } else {
        $array_count++;
    }
}
// die(print_r($targ));
$p1->SetCSIMTargets($targ, $alts);
// Horizontal: 'left','right','center'
// Vertical: 'bottom','top','center'
$graph->legend->SetAbsPos(10, 20, 'right', 'top');
// $graph->legend->Pos(0.5,0.5);
// $graph->legend->SetColumns(2);
$graph->legend->SetFont(FF_VERDANA, FS_NORMAL, 8);
// Adjust size and position of plot
$p1->SetSize(0.4);
$p1->SetCenter(0.39, 0.6);
// Setup slice labels and move them into the plot
$p1->value->SetFont(FF_FONT1, FS_BOLD);
$p1->value->SetColor("darkred");
$p1->SetLabelPos(0.7);
// Set perM  > 1  below to enable per million labels
$perM = 0;
if ($perM < 1) {
    $p1->SetLabelType(PIE_VALUE_ABS);
    $p1->value->SetFormat("%d");
} else {
    $p1->SetLabelType(PIE_VALUE_PER);
    $p1->value->SetFormat(".%dM");
}
// Set percentage to enable per percent labels
开发者ID:jeroenrnl,项目名称:php-syslog-ng,代码行数:31,代码来源:graphit.php

示例14: array

<?php

include "../jpgraph.php";
include "../jpgraph_pie.php";
include "../jpgraph_pie3d.php";
$data = array(40, 60, 21, 33);
$graph = new PieGraph(300, 200, "auto");
$graph->SetShadow();
$graph->title->Set("A simple Pie plot");
$graph->title->SetFont(FF_FONT1, FS_BOLD);
$p1 = new PiePlot3D($data);
$p1->SetSize(0.5);
$p1->SetCenter(0.45);
$p1->SetLegends($gDateLocale->GetShortMonth());
$graph->Add($p1);
$graph->Stroke();
?>


开发者ID:Ethennoob,项目名称:Web,代码行数:17,代码来源:example27.php

示例15: pie_chart

 public function pie_chart($piedata, $legentdata, $title)
 {
     require_once 'Examples/jpgraph/jpgraph.php';
     require_once 'Examples/jpgraph/jpgraph_pie.php';
     require_once 'Examples/jpgraph/jpgraph_pie3d.php';
     $graph = new PieGraph(800, 450);
     $graph->SetShadow();
     $graph->title->SetFont(FF_SIMSUN, FS_BOLD, 12);
     // 设置中文字体
     $graph->title->Set($title . "饼状图");
     $graph->SetFrame(false);
     $p1 = new PiePlot3D($piedata);
     $p1->SetSize(0.4);
     $p1->SetCenter(0.3);
     $p1->SetLegends($legentdata);
     $p1->SetLabelMargin(10);
     $graph->legend->SetFont(FF_SIMSUN, FS_NORMAL);
     $graph->legend->Pos(0.03, 0.18, 'right', 'top');
     $graph->legend->SetLayout(LEGEND_HOR);
     $graph->legend->SetColumns(2);
     $graph->legend->SetVColMargin(0);
     $graph->Add($p1);
     $graph->SetImgFormat('png', 90);
     $graph->Stroke();
 }
开发者ID:magiclake,项目名称:chaowei,代码行数:25,代码来源:statistic_new.php


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