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


PHP PiePlot::Explode方法代码示例

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


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

示例1: JpGraph

function JpGraph()
{
    $graph = new PieGraph(230, 200, "auto");
    //$graph->SetShadow();
    // Set A title for the plot
    $graph->title->Set($tpl->_ENGINE_parse_body("{your mailbox usage}\n ({$kb} mb free)"));
    $graph->title->SetFont(FF_FONT1, FS_BOLD, 12);
    $graph->title->SetColor("black");
    $p1 = new PiePlot($data);
    $p1->SetSliceColors(array("red", "green", "yellow", "green"));
    $p1->SetTheme("water");
    $p1->value->SetFont(FF_FONT1, FS_NORMAL, 10);
    $p1->Explode(array(0, 15, 15, 25, 15));
    //$p1->SetLabelType(PIE_VALUE_PER);
    //$lbl = array("{used} $USER_STORAGE_USAGE","{free}");
    //$p1->SetLabels($lbl);
    $graph->Add($p1);
    //$graph->img->SetAntiAliasing();
    $graph->Stroke();
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:20,代码来源:listener.graphs.php

示例2: array

<?php

include "../jpgraph.php";
include "../jpgraph_pie.php";
// Some data
$data = array(113, 5, 160, 3, 15, 10, 1);
// Create the Pie Graph.
$graph = new PieGraph(300, 200, "auto");
$graph->SetShadow();
// Set A title for the plot
$graph->title->Set("Example 1 Pie plot");
$graph->title->SetFont(FF_VERDANA, FS_BOLD, 14);
$graph->title->SetColor("brown");
// Create pie plot
$p1 = new PiePlot($data);
//$p1->SetSliceColors(array("red","blue","yellow","green"));
$p1->SetTheme("earth");
$p1->SetFont(FF_ARIAL, FS_NORMAL, 10);
// Set how many pixels each slice should explode
$p1->Explode(array(0, 15, 15, 25, 15));
$graph->Add($p1);
$graph->Stroke();
?>


开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:23,代码来源:pieex1.php

示例3: parse

 function parse($input, $parser)
 {
     global $jpgraphLabelType;
     foreach (split("\n", $input) as $line) {
         // skip empty line or comments
         if (preg_match("/^(\\s*)#.*\$|^(\\s*)\$/", $line)) {
             continue;
         }
         // Storing data
         $raw_data = split($this->fieldsep, $line);
         if (count($raw_data) == 2) {
             $this->labels[] = $raw_data[0];
             $this->datay[] = $raw_data[1];
         } else {
             $this->datay[] = $raw_data[0];
         }
     }
     if ($this->is3d) {
         $pie = new PiePlot3D($this->datay);
         $pie->SetAngle($this->angle);
     } else {
         $pie = new PiePlot($this->datay);
     }
     if ($this->center) {
         $tmp = split(",", $this->center);
         if (is_array($tmp) && count($tmp) == 2) {
             $pie->SetCenter($tmp[0], $tmp[1]);
         } else {
             if (is_array($tmp) && count($tmp) == 1) {
                 $pie->SetCenter($tmp[0]);
             }
         }
     }
     if ($this->labeltype) {
         $label_type = $jpgraphLabelType[$this->labeltype];
         if (!$label_type) {
             throw new JpgraphMWException("Unknown label type(" . $this->labeltype . "). Possible values are: " . implode(", ", array_keys($jpgraphLabelType)));
         }
         $pie->SetLabelType($label_type);
     }
     if ($this->labelformat) {
         $pie->value->SetFormat($this->labelformat);
     }
     if ($this->usettf) {
         $pie->value->SetFont($this->font);
     }
     $pie->value->Show($this->showlabel);
     $explode_pie_list = split(",", $this->explode);
     if (count($explode_pie_list) == 1) {
         $pie->ExplodeAll($explode_pie_list[0]);
     } else {
         $pie->Explode($explode_pie_list);
     }
     if (count($this->labels) == count($this->datay)) {
         $pie->SetLegends($this->labels);
     }
     $this->graph->Add($pie);
 }
开发者ID:mediawiki-extensions,项目名称:jpgraphmw,代码行数:58,代码来源:jpgraphmw.php


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