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

PHP PiePlot3d类代码示例

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

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



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

示例1: pieChart

 public static function pieChart($data, $legends)
 {
     $graph = new PieGraph(900, 550, 'auto');
     $graph->SetShadow();
     //        $graph->title->Set($topic);
     $graph->title->SetFont(FF_VERDANA, FS_BOLD, 14);
     $graph->legend->Pos(0.1, 0.2);
     // Creating a 3D pie graphic
     $p1 = new PiePlot3d($data);
     $p1->SetTheme("sand");
     $p1->SetLabels($legends);
     $p1->SetLabelPos(1);
     $p1->SetLabelType(PIE_VALUE_PER);
     $p1->value->Show();
     $p1->value->SetFont(FF_ARIAL, FS_NORMAL, 20);
     $p1->value->SetColor('darkgray');
     $p1->SetCenter(0.45, 0.5);
     $p1->SetAngle(45);
     $p1->ExplodeAll(20);
     //        $p1->value->SetFont(FF_ARIAL, FS_NORMAL, 12);
     //        $p1->SetLegends($legends);
     $graph->img->SetImgFormat('png');
     $graph->Add($p1);
     // Showing graphic
     return $graph->Stroke('../graph/3DpieChart.png');
 }
开发者ID:RushanGajanayake,项目名称:ACTA_Project,代码行数:26,代码来源:graphs.php


示例2: run

 /**
  * Runs the phpOpenTracker API call.
  *
  * @param  array $parameters
  * @return mixed
  * @access public
  */
 function run($parameters)
 {
     global $locale;
     $parameters['api_call'] = 'localizer';
     $parameters['what'] = 'top_localizer';
     $parameters['result_format'] = 'separate_result_arrays';
     list($names, $values, $percent, $total) = phpOpenTracker::get($parameters);
     $title = $locale->get('admin_stat', 'field_top') . ' ' . $parameters['limit'] . ' ' . $locale->get('admin_stat', 'field_countries');
     for ($i = 0, $numValues = sizeof($values); $i < $numValues; $i++) {
         $legend[$i] = sprintf('%s (%s, %s%%%%)', $names[$i], $values[$i], $percent[$i]);
     }
     $graph = new PieGraph($parameters['width'], $parameters['height'], 'auto');
     $graph->SetShadow();
     $graph->title->Set($title);
     $graph->title->SetFont($parameters['font'], $parameters['font_style'], $parameters['font_size']);
     $graph->title->SetColor('black');
     $graph->legend->Pos(0.1, 0.2);
     $plot = new PiePlot3d($values);
     $plot->SetTheme('sand');
     $plot->SetCenter(0.4);
     $plot->SetAngle(30);
     $plot->value->SetFont($parameters['font'], $parameters['font_style'], $parameters['font_size'] - 2);
     $plot->SetLegends($legend);
     $graph->Add($plot);
     $graph->Stroke();
 }
开发者ID:span20,项目名称:Kallay,代码行数:33,代码来源:plot_localizer.php


示例3: create3dpie

 /**
  * @@生成三维饼图
  * @param string $title
  * @param array $data
  * @param int $size
  * @param int $height
  * @param int $width
  * @param array $legend
  */
 static function create3dpie($title, $data = array(), $size = 40, $height = 100, $width = 80, $legend = array(), $slice = 0)
 {
     //包含相关的文件
     vendor("Jpgraph.jpgraph");
     vendor("Jpgraph.jpgraph_pie");
     vendor("Jpgraph.jpgraph_pie3d");
     // 创建图表
     $graph = new PieGraph($width, $height, "auto");
     $graph->SetShadow();
     // 设置标题
     $graph->title->Set(iconv("utf-8", "gb2312", $title));
     //$graph->title->SetFont(FF_VERDANA,FS_BOLD,18);
     $graph->title->SetFont(FF_SIMSUN, FS_BOLD, 18);
     $graph->title->SetColor("darkblue");
     $graph->legend->Pos(0.1, 0.2);
     $graph->SetFrame(false, '#ffffff', 0);
     //去掉周围的边框
     // Create 3D pie plot
     $p1 = new PiePlot3d($data);
     $p1->SetTheme("sand");
     $p1->SetCenter(0.4);
     $p1->SetSize($size);
     // Adjust projection angle
     $p1->SetAngle(70);
     // As a shortcut you can easily explode one numbered slice with
     if ($slice == 0) {
         $p1->ExplodeSlice(3);
     }
     // Setup the slice values
     $p1->value->SetFont(FF_ARIAL, FS_BOLD, 10);
     //$p1->value->SetFont(FF_SIMSUN,FS_BOLD,11);
     $p1->value->SetColor("navy");
     $graph->legend->SetFont(FF_SIMSUN, FS_BOLD, 8);
     //编码转化
     foreach ($legend as $k => $v) {
         $legend[$k] = iconv('utf-8', 'gb2312', $v);
     }
     $p1->SetLegends($legend);
     $graph->Add($p1);
     $graph->Stroke();
 }
开发者ID:leifuchen0111,项目名称:company,代码行数:50,代码来源:Chart.class.php


示例4: render

 function render($imgType)
 {
     $this->graph->SetImgFormat($imgType);
     if ($this->chartType == 'piechart') {
         $plot = new PiePlot3d($this->value_r);
         $plot->SetTheme("sand");
         $plot->SetCenter(0.35);
         $plot->SetAngle(50);
         $plot->SetLegends($this->display_r);
         $plot->SetLabelType(PIE_VALUE_ADJPER);
     } else {
         $this->graph->xaxis->SetTickLabels($this->display_r);
         $plot = new BarPlot($this->value_r);
         $plot->SetWidth(0.5);
         $plot->SetFillColor("[email protected]");
     }
     $this->graph->Add($plot);
     $this->graph->Stroke();
 }
开发者ID:horrabin,项目名称:opendb,代码行数:19,代码来源:JPGraphStatsChart.class.php


示例5: print_graph


//.........这里部分代码省略.........
        if ($type == 'pie') {
            $p1 = new PiePlot($data[0]);
            $p1->SetSliceColors($colours);
            if ($show_values) {
                $p1->value->SetFont(FF_USERFONT, FS_NORMAL, 8 * $k);
                if ($percent) {
                    $p1->SetLabelType(PIE_VALUE_PERADJ);
                } else {
                    $p1->SetLabelType(PIE_VALUE_ABS);
                }
                if ($percent || $show_percent) {
                    $p1->value->SetFormat("%d%%");
                } else {
                    $p1->value->SetFormat("%s");
                }
                // Enable and set policy for guide-lines. Make labels line up vertically
                $p1->SetGuideLines(true);
                $p1->SetGuideLinesAdjust(1.5);
            } else {
                $p1->value->Show(false);
            }
            $p1->SetLegends($legends);
            $p1->SetSize($psize);
            $p1->SetCenter($pposx, $pposy);
            if ($labels[0]) {
                $graph->subtitle->Set($labels[0]);
                $graph->subtitle->SetMargin(10 * $k);
                $graph->subtitle->SetFont(FF_USERFONT, FS_BOLD, 11 * $k);
                $graph->subtitle->SetColor("black");
            }
            $graph->Add($p1);
        } else {
            if ($type == 'pie3d') {
                $p1 = new PiePlot3d($data[0]);
                $p1->SetSliceColors($colours);
                if ($show_values) {
                    $p1->value->SetFont(FF_USERFONT, FS_NORMAL, 8 * $k);
                    if ($percent) {
                        $p1->SetLabelType(PIE_VALUE_PERADJ);
                    } else {
                        $p1->SetLabelType(PIE_VALUE_ABS);
                    }
                    if ($percent || $show_percent) {
                        $p1->value->SetFormat("%d%%");
                    } else {
                        $p1->value->SetFormat("%s");
                    }
                } else {
                    $p1->value->Show(false);
                }
                $p1->SetLegends($legends);
                $p1->SetEdge();
                $p1->SetSize($psize);
                $p1->SetCenter($pposx, $pposy);
                if ($labels[0]) {
                    $graph->subtitle->Set($labels[0]);
                    $graph->subtitle->SetMargin(10 * $k);
                    $graph->subtitle->SetFont(FF_USERFONT, FS_BOLD, 11 * $k);
                    $graph->subtitle->SetColor("black");
                }
                $graph->Add($p1);
            } else {
                if ($type == 'radar') {
                    $graph->SetSize($psize);
                    $graph->SetPos($pposx, $pposy);
                    $graph->SetTitles($legends);
开发者ID:BozzaCoon,项目名称:SPHERE-Framework,代码行数:67,代码来源:graph.php


示例6: array

    $label1 = 'Funds Raised';
    $label2 = 'Goal';
    $title = 'Fundraising Objective';
}
// Some data
$data = array($balance, $total);
//$data = $findata;
// Create the Pie Graph.
$graph = new PieGraph(350, 200, "auto");
// Set A title for the plot
$graph->title->Set($title);
$graph->title->SetFont(FF_TIMES, FS_BOLD, 18);
$graph->title->SetColor("darkblue");
$graph->legend->Pos(0.03, 0.3);
// Create 3D pie plot
$p1 = new PiePlot3d($data);
$graph->SetShadow();
$p1->SetSliceColors(array('#5CD900', '#6666FF'));
$p1->SetCenter(0.4);
$p1->SetSize(80);
// Adjust projection angle
$p1->SetAngle(45);
// Adjsut angle for first slice
$p1->SetStartAngle(45);
// Display the slice values
$p1->value->SetFont(FF_TIMES, FS_BOLD, 11);
$p1->value->SetColor("navy");
// Add colored edges to the 3D pie
// NOTE: You can't have exploded slices with edges!
$p1->SetEdge("navy");
$p1->SetLabelType(PIE_VALUE_ABS);
开发者ID:centaurustech,项目名称:BenFund,代码行数:31,代码来源:goal.php


示例7: PieGraph

require_once "{$jpgraph}/jpgraph_pie.php";
require_once "{$jpgraph}/jpgraph_pie3d.php";
// Setup graph
$graph = new PieGraph(400, 400, "auto");
$graph->SetAntiAliasing();
$graph->SetMarginColor('#fafafa');
//$graph->SetShadow();
// Setup graph title
if ($type == "event") {
    //$graph->title->Set(gettext("EVENTS RECEIVED"));
} elseif ($type == "alarm") {
    //$graph->title->Set(gettext("ALARMS RECEIVED"));
}
$graph->title->SetFont(FF_FONT1, FS_BOLD);
// Create pie plot
$p1 = new PiePlot3d($data);
$p1->SetHeight(12);
$p1->SetSize(0.3);
if (count($labels) > 1) {
    $p1->SetCenter(0.5, 0.25);
} else {
    $p1->SetCenter(0.57, 0.25);
}
$p1->SetLegends($legend);
$p1->SetLabels($labels);
$p1->SetLabelPos(1);
$graph->legend->SetPos(0.5, 0.95, 'center', 'bottom');
$graph->legend->SetShadow('#fafafa', 0);
$graph->legend->SetFrameWeight(0);
$graph->legend->SetFillColor('#fafafa');
$graph->SetFrame(false);
开发者ID:jhbsz,项目名称:ossimTest,代码行数:31,代码来源:events_received_graph.php


示例8: PIE_graph

 function PIE_graph($module, $method, $type, $start, $extra_fields)
 {
     global $C_translate, $C_auth;
     include_once PATH_CORE . 'validate.inc.php';
     $dt = new CORE_validate();
     include PATH_GRAPH . "jpgraph.php";
     ####################################################################
     ### Check if 'search' is authorized for this account
     ####################################################################
     # check the validation for this function
     if ($C_auth->auth_method_by_name($module, 'search')) {
         # validate this file exists, and include it.
         if (file_exists(PATH_MODULES . '/' . $module . '/' . $module . '.inc.php')) {
             include_once PATH_MODULES . '/' . $module . '/' . $module . '.inc.php';
         } else {
             ### Not exist!
             $error = $C_translate->translate('module_non_existant', '', '');
         }
     } else {
         ### Not auth
         $error = $C_translate->translate('module_non_auth', '', '');
     }
     if (isset($error)) {
         include PATH_GRAPH . "jpgraph_canvas.php";
         // Create the graph.
         $graph = new CanvasGraph(460, 55, "auto");
         $t1 = new Text($error);
         $t1->Pos(0.2, 0.5);
         $t1->SetOrientation("h");
         $t1->SetBox("white", "black", 'gray');
         $t1->SetFont(FF_FONT1, FS_NORMAL);
         $t1->SetColor("black");
         $graph->AddText($t1);
         $graph->Stroke();
         exit;
     }
     # initialize the module, if it has not already been initialized
     $eval = '$' . $module . ' = new ' . $module . '; ';
     $eval .= '$this_Obj  = $' . $module . ';';
     eval($eval);
     # run the function
     $array = call_user_func(array($module, $method), $start_str, $end_str, $constraint_array, $default_array, $extra_fields);
     include PATH_GRAPH . "jpgraph_pie.php";
     include PATH_GRAPH . "jpgraph_pie3d.php";
     $data = $array['data'];
     $legends = $array['legends'];
     // Create the Pie Graph.
     $graph = new PieGraph(500, 250, "auto");
     $graph->SetScale("textlin");
     $graph->SetMarginColor('#F9F9F9');
     $graph->SetFrame(true, '#FFFFFF', 0);
     $graph->SetColor('#F9F9F9');
     // Create pie plot
     $p1 = new PiePlot3d($data);
     $p1->SetTheme("water");
     $p1->SetCenter(0.4);
     $p1->SetAngle(30);
     $p1->value->SetFont(FF_FONT1, FS_NORMAL, 8);
     $p1->SetLegends($legends);
     // Explode the larges slice:
     $largest = 0;
     for ($i = 0; $i < count($data); $i++) {
         if ($data[$i] > $largest) {
             $largest = $data[$i];
             $explode = $i;
         }
     }
     if ($explode) {
         $p1->ExplodeSlice($explode);
     }
     $graph->Add($p1);
     $graph->Stroke();
 }
开发者ID:chiranjeevjain,项目名称:agilebill,代码行数:73,代码来源:graph.inc.php


示例9: array

$data_array = array();
$label_array = array();
foreach($data as $key => $item){
	$data_array[] = $item;
	$label_array[] = $labels[$key];
}
	
debug_message(print_r($data_array, TRUE).print_r($label_array,TRUE));
// Create the Pie Graph.
$graph = new PieGraph(500,325);
$graph->SetShadow();

// Set A title for the plot
$graph->title->Set($title);
#$graph->title->SetFont(FF_VERDANA,FS_BOLD,18); 
$graph->title->SetColor("darkblue");
//$graph->legend->Pos(0.1,0.2);

// Create pie plot
$p1 = new PiePlot3d($data_array);
$p1->SetTheme("earth");
$p1->SetCenter(0.35, 0.6);
$p1->SetAngle(30);
#$p1->SetFont(FF_ARIAL,FS_NORMAL,12);
$p1->SetLegends($label_array);

$graph->Add($p1);
$graph->Stroke();


?>
开发者ID:nanoprime,项目名称:sureinvoice,代码行数:31,代码来源:graph.php


示例10: formatNumber

    $funds[$i] = $Fund;
    $totals[$i] = $Total;
    $funds[$i] = $funds[$i] . " (" . formatNumber($Total, 'money') . ")";
    $i++;
}
// Start Graphing ---------------------------->
// Create the graph.
$graph = new PieGraph(550, 200);
$graph->SetShadow();
// Set A title for the plot
$graph->title->Set(gettext("Total by Fund for") . " {$sDate}");
$graph->title->SetFont(FF_FONT1, FS_BOLD, 16);
$graph->title->SetColor("darkblue");
$graph->legend->Pos(0.02, 0.15);
// Create the bar plot
$p1 = new PiePlot3d($totals);
$p1->SetTheme("sand");
$p1->SetCenter(0.285);
$p1->SetSize(85);
// Adjust projection angle
$p1->SetAngle(45);
// Adjsut angle for first slice
$p1->SetStartAngle(315);
// As a shortcut you can easily explode one numbered slice with
//$p1->ExplodeSlice(1);
// Use absolute values (type==1)
$p1->SetLabelType(PIE_VALUE_ABS);
// Display the slice values
$p1->value->SetFormat($aLocaleInfo["currency_symbol"] . ' %d');
$p1->value->Show();
// Set font for legend
开发者ID:vikingkarwur,项目名称:smjgpib,代码行数:31,代码来源:funds1day.php


示例11: displayGraph


//.........这里部分代码省略.........
                    $lineplot->SetStepStyle();
                }
                if ($G_ARR_FILL_COLOR[$num] == true) {
                    $lineplot->SetFillColor($G_ARR_COLOR[$num]);
                }
                $lineplot->SetColor($G_ARR_COLOR[$num]);
                $lineplot->SetWeight($G_WEIGHT);
                $lineplot->SetLegend($G_ARR_LEYEND[$num]);
                $arr_lineplot[] = $lineplot;
            }
            foreach ($arr_lineplot as $num => $yDatas) {
                $graph->Add($yDatas);
            }
            if (sizeof($xData) > 100) {
                $graph->xaxis->SetTextTickInterval((int) (sizeof($xData) / 10));
            }
            $graph->Stroke();
        } else {
            if ($G_TYPE == 'plot3d') {
                $graph = new PieGraph($G_SIZE[0], $G_SIZE[1], "auto");
                if ($G_SHADOW) {
                    $graph->SetShadow();
                }
                $dataMarginColor = isset($result["ATTRIBUTES"]["MARGIN_COLOR"]) ? $result["ATTRIBUTES"]["MARGIN_COLOR"] : "#999999";
                $dataSizePie = isset($result["ATTRIBUTES"]["SIZE_PIE"]) ? $result["ATTRIBUTES"]["SIZE_PIE"] : "80";
                $graph->SetMarginColor($G_COLOR);
                $graph->SetFrame(true, $dataMarginColor);
                $graph->legend->Pos($G_LEYEND_POS[0], $G_LEYEND_POS[1], "right", "center");
                $graph->legend->SetFillColor("#fafafa");
                $graph->legend->SetColor("#444444", "#999999");
                $graph->legend->SetShadow('[email protected]', 4);
                $graph->legend->SetColumns($G_LEYEND_NUM_COLUMN);
                $graph->title->Set($G_TITLE);
                $pieplot3d = new PiePlot3d($G_YDATAS[0]);
                $pieplot3d->SetSliceColors($G_ARR_COLOR);
                $pieplot3d->SetCenter(0.4);
                $pieplot3d->SetSize($dataSizePie);
                $pieplot3d->SetAngle(45);
                $pieplot3d->SetStartAngle(45);
                $pieplot3d->value->SetColor('black');
                //color a los porcentages
                $pieplot3d->SetEdge('black');
                //da color al contorno y separacion del pastel
                $pieplot3d->SetLegends($xData);
                $graph->Add($pieplot3d);
                $graph->Stroke();
            } else {
                if ($G_TYPE == 'plot3d2') {
                    if (!function_exists('displayGraph_draw_pie3d')) {
                        function displayGraph_draw_pie3d($canvasx, $ydata, $arrcolor)
                        {
                            $canvasy = $canvasx;
                            $escala = $canvasx / 320.0;
                            $iAnchoPastel = 256 * $escala;
                            $iAltoPastel = 155 * $escala;
                            $iPosCentroX = 141 * $escala;
                            $iPosCentroY = 91 * $escala;
                            $thumb = imagecreatetruecolor($canvasx * 284 / 320, $canvasy * 250 / 320);
                            $transparent = imagecolorallocatealpha($thumb, 200, 200, 200, 127);
                            imagefill($thumb, 0, 0, $transparent);
                            // Asignar colores de imagen
                            $imgcolor = array();
                            foreach ($arrcolor as $i => $sHtmlColor) {
                                $r = $g = $b = 0;
                                sscanf($sHtmlColor, "#%02x%02x%02x", $r, $g, $b);
                                $imgcolor[$i] = imagecolorallocate($thumb, $r, $g, $b);
开发者ID:hardikk,项目名称:HNH,代码行数:67,代码来源:paloSantoGraphImage.lib.php


示例12: array

<?php

include "../jpgraph.php";
include "../jpgraph_pie.php";
include "../jpgraph_pie3d.php";
// Some data
$data = array(20, 27, 45, 75, 90);
// Create the Pie Graph.
$graph = new PieGraph(350, 200, "auto");
$graph->SetShadow();
// Set A title for the plot
$graph->title->Set("Example 1 3D Pie plot");
$graph->title->SetFont(FF_VERDANA, FS_BOLD, 18);
$graph->title->SetColor("darkblue");
$graph->legend->Pos(0.1, 0.2);
// Create pie plot
$p1 = new PiePlot3d($data);
$p1->SetTheme("sand");
$p1->SetCenter(0.4);
$p1->SetAngle(30);
$p1->value->SetFont(FF_ARIAL, FS_NORMAL, 12);
$p1->SetLegends(array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct"));
$graph->Add($p1);
$graph->Stroke();
?>


开发者ID:centaurustech,项目名称:BenFund,代码行数:25,代码来源:pie3dex1.php


示例13: run

 /**
  * Runs the phpOpenTracker API call.
  *
  * @param  array $parameters
  * @return mixed
  * @access public
  */
 function run($parameters)
 {
     $parameters['api_call'] = 'top';
     $parameters['result_format'] = 'separate_result_arrays';
     list($names, $values, $percent, $total) = phpOpenTracker::get($parameters);
     $title = 'Top ' . $parameters['limit'] . ' ';
     switch ($parameters['what']) {
         case 'document':
             $title .= 'Pages';
             break;
         case 'entry_document':
             $title .= 'Entry Pages';
             break;
         case 'exit_document':
             $title .= 'Exit Pages';
             break;
         case 'exit_target':
             $title .= 'Exit Targets';
             break;
         case 'host':
             $title .= 'Hosts';
             break;
         case 'operating_system':
             $title .= 'Operating Systems';
             break;
         case 'referer':
             $title .= 'Referers';
             break;
         case 'user_agent':
             $title .= 'User Agents';
             break;
     }
     $title .= " (Total: {$total})";
     for ($i = 0, $numValues = sizeof($values); $i < $numValues; $i++) {
         $legend[$i] = sprintf('%s (%s, %s%%%%)', $names[$i], $values[$i], $percent[$i]);
     }
     $graph = new PieGraph($parameters['width'], $parameters['height'], 'auto');
     $graph->SetShadow();
     $graph->title->Set($title);
     $graph->title->SetFont($parameters['font'], $parameters['font_style'], $parameters['font_size']);
     $graph->title->SetColor('black');
     $graph->legend->Pos(0.1, 0.2);
     $plot = new PiePlot3d($values);
     $plot->SetTheme('sand');
     $plot->SetCenter(0.4);
     $plot->SetAngle(30);
     $plot->value->SetFont($parameters['font'], $parameters['font_style'], $parameters['font_size'] - 2);
     $plot->SetLegends($legend);
     $graph->Add($plot);
     $graph->Stroke();
 }
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:58,代码来源:plot_top.php


示例14: PieGraph

    $graph = new PieGraph(400, 250, "auto");
    #$graph->SetAntiAlias(true);
    $graph->title->Set("");
    $graph->legend->Pos(0.1, 0.1);
    $p1 = new PiePlot3d($data);
    $p1->SetSliceColors(array('#333333', '#333333'));
    $p1->SetCenter(0.4);
    $p1->SetSize(90);
    $p1->SetAngle(45);
    $p1->value->SetColor("#666666");
    $p1->SetLegends(explode(",", "" . $key . ""));
    $graph->Add($p1);
    $graph->Stroke();
} else {
    $value = "" . ($quota - $_GET['used']) . "," . $_GET['used'] . "";
    $key = "Free space: (" . FormatFileSize($diplayquota - $_GET['used']) . "),Used space: (" . FormatFileSize($_GET['used']) . ")";
    $data = explode(",", "" . $value . "");
    $graph = new PieGraph(400, 250, "auto");
    #$graph->SetAntiAlias(true);
    $graph->title->Set("");
    $graph->legend->Pos(0.1, 0.1);
    $p1 = new PiePlot3d($data);
    $p1->SetSliceColors(array('#039ACA', '#333333'));
    $p1->SetCenter(0.4);
    $p1->SetSize(90);
    $p1->SetAngle(45);
    $p1->value->SetColor("#666666");
    $p1->SetLegends(explode(",", "" . $key . ""));
    $graph->Add($p1);
    $graph->Stroke();
}
开发者ID:shishenkov,项目名称:zpanel,代码行数:31,代码来源:zPieGraph.php


示例15: piePlot

 private function piePlot($question, $datax, $datay, $width, $height)
 {
     include_once BASE . "jpgraph.php";
     include_once BASE . "jpgraph_pie.php";
     include_once BASE . "jpgraph_pie3d.php";
     // Create the Pie Graph.
     $graph = new PieGraph($width, $height, "auto");
     $graph->SetShadow();
     // Set A title for the plot
     $tFontSize = 11;
     $graph->title->Set($question);
     $graph->title->SetFont(FF_VERDANA, FS_BOLD, $tFontSize);
     $graph->title->SetColor("darkblue");
     $graph->SetAntiAliasing(true);
     $graph->legend->SetPos(0.02, 0.95, 'right', 'bottom');
     $graph->legend->SetMarkAbsSize(5);
     $graph->legend->SetFont(FF_ARIAL, FS_NORMAL, 9);
     $tWidth = $graph->title->GetWidth($graph->img);
     //if ($graph->title->GetWidth($graph->img)>$width) $graph->title->SetFont(FF_VERDANA, FS_BOLD, $tFontSize-2);
     if ($tWidth > $width) {
         $index = strrpos(substr($question, 0, ($len = strlen($question)) / 2 + 5), ' ');
         //echo $index;
         if ($index === false) {
             $index = $len / 2 - 3;
         }
         $question[$index] = "\n";
         $graph->title->SetFont(FF_VERDANA, FS_BOLD, $tFontSize -= 2);
         $graph->title->Set($question);
     }
     // Create pie plot
     $pie = new PiePlot3d($datay);
     $pie->SetTheme("sand");
     $pie->SetCenter(0.5, 0.4);
     $pie->SetSize(($t = $height * 0.005 / $this->amountOfVariants) > 0.5 ? 0.5 : $t);
     $pie->SetAngle(30);
     $pie->ExplodeAll(5);
     $pie->value->SetFont(FF_ARIAL, FS_NORMAL, 10);
     $pie->SetLegends($datax);
     $graph->Add($pie);
     return $graph->Stroke("images/raporty/{$this->id_pytanie}P.png");
 }
开发者ID:BackupTheBerlios,项目名称:phppool,代码行数:41,代码来源:PlotQuestion.php


示例16: array

    }
}
//
$conf = $GLOBALS["CONF"];
$colors = array("#E9967A", "#F08080", "#FF6347", "#FF4500", "#FF0000", "#DC143C", "#B22222");
$jpgraph = $conf->get_conf("jpgraph_path");
require_once "{$jpgraph}/jpgraph.php";
require_once "{$jpgraph}/jpgraph_pie.php";
require_once "{$jpgraph}/jpgraph_pie3d.php";
// Setup graph
$graph = new PieGraph(350, 420, "auto");
$graph->SetAntiAliasing();
$graph->SetMarginColor('#fafafa');
$graph->title->SetFont(FF_FONT1, FS_BOLD);
// Create pie plot
$p1 = new PiePlot3d($data);
$p1->SetHeight(12);
$p1->SetSize(0.5);
if (count($labels) > 1) {
    $p1->SetCenter(0.5, 0.25);
} else {
    $p1->SetCenter(0.57, 0.25);
}
$p1->SetLegends($legend);
$p1->SetLabels($labels);
$p1->SetLabelPos(1);
$graph->legend->SetPos(0.5, 0.95, 'center', 'bottom');
$graph->legend->SetShadow('#fafafa', 0);
$graph->legend->SetFrameWeight(1);
$graph->legend->SetFillColor('#fafafa');
$graph->legend->SetColumns(2);
开发者ID:jhbsz,项目名称:ossimTest,代码行数:31,代码来源:geographic_graph.php


示例17: grafic_trunk2

function grafic_trunk2(&$pDB_ast_cdr, &$pDB_ast, $module_name, $trunk, $dti, $dtf)
{
    //
    require_once "modules/{$module_name}/libs/paloSantoExtention.class.php";
    $objPalo_AST_CDR = new paloSantoExtention($pDB_ast_cdr);
    /* Si la troncal pedida es un grupo, se expande el grupo para averiguar las
       troncales individuales. */
    $regs = NULL;
    if (preg_match('!^DAHDI/(g|r)(\\d+)$!i', $trunk, $regs)) {
        $iGrupoTrunk = (int) $regs[2];
        $gruposTrunk = getTrunkGroupsDAHDI();
        if (is_array($gruposTrunk) && isset($gruposTrunk[$iGrupoTrunk])) {
            $trunk = $gruposTrunk[$iGrupoTrunk];
        }
    }
    //total minutos de llamadas in y out
    $arrayTemp = $objPalo_AST_CDR->loadTrunks($trunk, "numcall", $dti, $dtf);
    $arrResult = $arrayTemp[0];
    //$arrResult[0] => "IN"
    //$arrResult[1] => "OUT"
    $tot = $arrResult[0] + $arrResult[1];
    $usoDisco = $tot != 0 ? 100 * ($arrResult[0] / $tot) : 0;
    if ($tot != 0) {
        $freeDisco = 100 - $usoDisco;
        // Some data
        $data = array($usoDisco, $freeDisco);
        // Create the Pie Graph.
        $graph = new PieGraph(400, 170, "auto");
        //$graph->SetShadow();
        $graph->SetMarginColor('#fafafa');
        $graph->SetFrame(true, '#999999');
        $graph->legend->SetFillColor("#fafafa");
        //$graph->legend->Pos(0.012, 0.5, "right","center");
        $graph->legend->SetColor("#444444", "#999999");
        $graph->legend->SetShadow('[email protected]', 4);
        //$graph->title->SetColor("#444444");
        // Set A title for the plot
        $graph->title->Set(utf8_decode(_tr("Number of Calls")));
        //$graph->title->SetFont(FF_VERDANA,FS_BOLD,18);
        $graph->title->SetColor("#444444");
        $graph->legend->Pos(0.04, 0.2);
        // Create 3D pie plot
        $p1 = new PiePlot3d($data);
        //$p1->SetTheme("water");
        $p1->SetSliceColors(array("#3333cc", "#9999cc", "#CC3333", "#72394a", "#aa3424"));
        $p1->SetCenter(0.3);
        $p1->SetSize(80);
        // Adjust projection angle
        $p1->SetAngle(45);
        // Adjsut angle for first slice
        $p1->SetStartAngle(45);
        // Display the slice values
        //$p1->value->SetFont(FF_ARIAL,FS_BOLD,11);
        //$p1->value->SetColor("navy");
        $p1->value->SetColor("black");
        // Add colored edges to the 3D pies
        // NOTE: You can't have exploded slices with edges!
        $p1->SetEdge("black");
        $p1->SetLegends(array(utf8_decode(_tr("Incoming Calls") . ":  ") . $arrResult[0], utf8_decode(_tr("Outcoming Calls") . ": ") . $arrResult[1]));
        $graph->Add($p1);
        $graph->Stroke();
    } else {
        $graph = new CanvasGraph(400, 140, "auto");
        $title = new Text(utf8_decode(_tr("Number of Calls")));
        $title->ParagraphAlign('center');
        $title->SetFont(FF_FONT2, FS_BOLD);
        $title->SetMargin(3);
        $title->SetAlign('center');
        $title->Center(0, 400, 70);
        $graph->AddText($title);
        $t1 = new Text(utf8_decode(_tr("There are no data to present")));
        $t1->SetBox("white", "black", true);
        $t1->ParagraphAlign("center");
        $t1->SetColor("black");
        $graph->AddText($t1);
        $graph->img->SetColor('navy');
        $graph->img->SetTextAlign('center', 'bottom');
        $graph->img->Rectangle(0, 0, 399, 139);
        $graph->Stroke();
    }
}
开发者ID:netconstructor,项目名称:elastix-mt-gui,代码行数:81,代码来源:index.php


示例18: array

// content="text/plain; charset=utf-8"
require_once 'jpgraph/jpgraph.php';
require_once 'jpgraph/jpgraph_pie.php';
require_once 'jpgraph/jpgraph_pie3d.php';
// 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 5 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);
// Adjsut angle for first slice
$p1->SetStartAngle(45);
// Display the slice values
$p1->value->SetFont(FF_ARIAL, FS_BOLD, 11);
$p1->value->SetColor("navy");
// Add colored edges to the 3D pie
// NOTE: You can't have exploded slices with edges!
$p1->SetEdge("navy");
$p1->SetLegends(array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct"));
$graph->Add($p1);
开发者ID:hcvcastro,项目名称:pxp,代码行数:31,代码来源:pie3dex5.php


示例19: array

<?php

include "../jpgraph.php";
include "../jpgraph_pie.php";
include "../jpgraph_pie3d.php";
// Some data
$data = array(200, 27, 45, 75, 90);
// Create the Pie Graph.
$graph = new PieGraph(400, 300, "auto");
$graph->SetFrame(true, 'darkblue', 0);
//$theme_class= new VividTheme;
//$graph->SetTheme($theme_class);
// Set A title for the plot
//$graph->title->Set("Example 1 3D Pie plot");
//$graph->title->SetFont(FF_VERDANA,FS_BOLD,18);
//$graph->title->SetColor("darkblue");
//$graph->legend->Pos(0.1,0.2);
// Create pie plot
$p1 = new PiePlot3d($data);
$p1->SetTheme("pastel");
$p1->SetCenter(0.5);
$p1->SetAngle(60);
$p1->SetSliceColors(array('red', 'blue', 'green', 'navy', 'orange'));
//$p1->value->SetFont(FF_ARIAL,FS_NORMAL,12);
//$p1->SetLegends(array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct"));
$graph->Add($p1);
$graph->Stroke();
?>


开发者ID:kipkaev55,项目名称:asterisk,代码行数:28,代码来源:pie3dex1.php


示例20: graph_pie

function graph_pie($p_metrics, $p_title = '', $p_graph_width = 500, $p_graph_height = 350, $p_center = 0.4, $p_poshorizontal = 0.1, $p_posvertical = 0.09)
{
    $t_graph_font = graph_get_font();
    error_check(is_array($p_metrics) ? array_sum($p_metrics) : 0, $p_title);
    $graph = new PieGraph($p_graph_width, $p_graph_height);
    $graph->img->SetMargin(40, 40, 40, 100);
    $graph->title->Set($p_title);
    $graph->title->SetFont($t_graph_font, FS_BOLD);
    $graph->SetMarginColor('white');
    $graph->SetFrame(false);
    $graph->legend->Pos($p_poshorizontal, $p_posvertical);
    $graph->legend->SetFont($t_graph_font);
    $p1 = new PiePlot3d(array_values($p_metrics));
    // should be reversed?
    $p1->SetTheme('earth');
    #$p1->SetTheme("sand");
    $p1->SetCenter($p_center);
    $p1->SetAngle(60);
    $p1->SetLegends(array_keys($p_metrics));
    # Label format
    $p1->value->SetFormat('%2.0f');
    $p1->value->Show();
    $p1->value->SetFont($t_graph_font);
    $graph->Add($p1);
    if (helper_show_queries()) {
        $graph->subtitle->Set(db_count_queries() . ' queries (' . db_count_unique_queries() . ' unique) (' . db_time_queries() . 'sec)');
        $graph->subtitle->SetFont($t_graph_font, FS_NORMAL, 8);
    }
    $graph->Stroke();
}
开发者ID:jin255ff,项目名称:company_website,代码行数:30,代码来源:graph_api.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP Pieform类代码示例发布时间:2022-05-23
下一篇:
PHP PiePlot3D类代码示例发布时间: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