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


PHP PieGraph::SetAntiAliasing方法代码示例

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


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

示例1: PieGraph

    $data['value'][] = $value['var2'];
    if ($value['var2'] != 0) {
        // 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(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');
开发者ID:AntBean,项目名称:alienvault-ossim,代码行数:31,代码来源:CIAPotentialImpactsRisksPie1.php

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


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