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


PHP PiePlot3D::SetStartAngle方法代码示例

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


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

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

示例2: PieGraph

 function generatePie3D($data, $legend_index = 0, $chartData_index = 1, $image = false, $length = 500, $width = 300, $hasShadow = true, $fontFamily = FF_FONT1, $fontStyle = FS_BOLD, $fontSize = '', $fontColor = 'black')
 {
     include_once XHELP_JPGRAPH_PATH . '/jpgraph_pie.php';
     include_once XHELP_JPGRAPH_PATH . '/jpgraph_pie3d.php';
     $graph = new PieGraph($length, $width);
     if ($hasShadow) {
         // Add a shadow to the image
         $graph->setShadow();
     }
     $graph->title->Set($this->meta['name']);
     $p1 = new PiePlot3D($data[$chartData_index]);
     $p1->SetSize(0.3);
     $p1->SetCenter(0.45);
     $p1->SetStartAngle(20);
     $p1->SetAngle(45);
     $p1->SetLegends($data[$legend_index]);
     $p1->value->SetFont($fontFamily, $fontStyle, $fontSize);
     $p1->value->SetColor($fontColor);
     $p1->SetLabelType(PIE_VALUE_PER);
     $a = array_search(max($data[$chartData_index]), $data[$chartData_index]);
     //Find the position of maximum value.
     $p1->ExplodeSlice($a);
     // Set graph background image
     if ($image != false) {
         $graph->SetBackgroundImage($image, BGIMG_FILLFRAME);
     }
     $graph->Add($p1);
     $graph->Stroke();
 }
开发者ID:trabisdementia,项目名称:xuups,代码行数:29,代码来源:report.php

示例3:

     $graph->SetMarginColor('#FAFAFA');
     $graph->legend->SetShadow('#fafafa', 0);
     //$graph->legend->SetFillColor('#fafafa');
     $graph->legend->SetFrameWeight(0);
 } else {
     if (intval($w) == 2) {
         $graph->SetMarginColor('#FFFFFF');
         $graph->legend->SetShadow('#FFFFFF', 0);
         $graph->legend->SetFillColor('#FFFFFF');
         $graph->legend->SetFrameWeight(0);
     }
 }
 $p1 = new PiePlot3D($data);
 $graph->SetFrame(false, '#ffffff');
 $p1->SetSize(0.5);
 $p1->SetStartAngle(290);
 $p1->SetAngle(50);
 $p1->SetCenter(0.35);
 $p1->SetLegends($legend);
 //$colors=array("#C835ED", "red", "orange", "green", "#eeeeee");
 //$colors=array("#C835ED", "red", "orange", "#FFD700", "#F0E68C");
 $p1->SetSliceColors($colors);
 $p1->ExplodeAll(8);
 //$dplot[0]->SetFillColor("blue");
 //$dplot[1]->SetFillColor("green");
 //$dplot[2]->SetFillColor("navy");
 //$dplot[3]->SetFillColor("orange");
 //$dplot[4]->SetFillColor("magenta");
 //$dplot[5]->SetFillColor("yellow");
 //$dplot[6]->SetFillColor("red");
 $graph->Add($p1);
开发者ID:jhbsz,项目名称:ossimTest,代码行数:31,代码来源:graph1.php

示例4: array

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 4 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);
// As a shortcut you can easily explode one numbered slice with
$p1->ExplodeSlice(3);
// Setup 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,代码行数:31,代码来源:pie3dex4.php


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