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


PHP PiePlot3d::SetLabelType方法代码示例

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


在下文中一共展示了PiePlot3d::SetLabelType方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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("orange@0.75");
     }
     $this->graph->Add($plot);
     $this->graph->Stroke();
 }
开发者ID:horrabin,项目名称:opendb,代码行数:19,代码来源:JPGraphStatsChart.class.php

示例3:

// 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);
$p1->value->SetFormat('$%d');
$p1->SetLabels(array($balance, $total), 1);
$p1->SetLegends(array($label1, $label2));
$graph->Add($p1);
$graph->Stroke();
?>


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

示例4: print_graph


//.........这里部分代码省略.........
                        if ($longestlabel && !$overlap) {
                            // if legend showing
                            $pmr = $longestlabel * 5 + 40;
                        }
                        $graph->legend->Pos(0.02, 0.1, 'right', 'top');
                    } else {
                        if ($type == 'horiz_bar') {
                            $pml = 50;
                            $pmr = 20;
                            $pmt = 50;
                            $pmb = 45;
                            $ll = $longestlegend * 6.5;
                            // 8pt fontsize
                            $pml = max($pml, $ll + 20);
                            $xaxislblmargin = $pml - 20;
                            $yaxislblmargin = $pmb - 15;
                            if ($longestlabel && !$overlap) {
                                // if legend showing
                                $pmr = $longestlabel * 5 + 40;
                            }
                            $graph->legend->Pos(0.02, 0.1, 'right', 'top');
                        }
                    }
                }
            }
        }
        // DRAW THE GRAPHS
        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);
开发者ID:BozzaCoon,项目名称:SPHERE-Framework,代码行数:67,代码来源:graph.php


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