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


PHP PiePlot3D::SetLabelMargin方法代码示例

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


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

示例1: pie_chart

 public function pie_chart($piedata, $legentdata, $title)
 {
     require_once 'Examples/jpgraph/jpgraph.php';
     require_once 'Examples/jpgraph/jpgraph_pie.php';
     require_once 'Examples/jpgraph/jpgraph_pie3d.php';
     $graph = new PieGraph(800, 450);
     $graph->SetShadow();
     $graph->title->SetFont(FF_SIMSUN, FS_BOLD, 12);
     // 设置中文字体
     $graph->title->Set($title . "饼状图");
     $graph->SetFrame(false);
     $p1 = new PiePlot3D($piedata);
     $p1->SetSize(0.4);
     $p1->SetCenter(0.3);
     $p1->SetLegends($legentdata);
     $p1->SetLabelMargin(10);
     $graph->legend->SetFont(FF_SIMSUN, FS_NORMAL);
     $graph->legend->Pos(0.03, 0.18, 'right', 'top');
     $graph->legend->SetLayout(LEGEND_HOR);
     $graph->legend->SetColumns(2);
     $graph->legend->SetVColMargin(0);
     $graph->Add($p1);
     $graph->SetImgFormat('png', 90);
     $graph->Stroke();
 }
开发者ID:magiclake,项目名称:chaowei,代码行数:25,代码来源:statistic_new.php

示例2: PieGraph

////////////////////////////////////////////////////////
///////////////Graficas en torta para colaboradores/////////////////////////////////
////////////////////////////////////////////////////////
$data = $TotalCol;
$leyenda = $NombresCol;
// Create the Pie Graph.
$graph = new PieGraph(650, 700);
//$graph->img->SetMargin(100,50,60,60);
$theme_class = new VividTheme();
$graph->SetTheme($theme_class);
// Set A title for the plot
$graph->title->Set("A Simple 3D Pie Plot");
// Create
$p1 = new PiePlot3D($data);
$p1->SetLegends($leyenda);
$p1->SetLabelMargin(10);
$graph->Add($p1);
$p1->ShowBorder();
$p1->SetColor('black');
$p1->ExplodeSlice(1);
$graph->title->Set("Produccion por colaborador de {$FechaIni} a {$FechaFinal}");
$contentType = 'image/png';
$gdImgHandler = $graph->Stroke(_IMG_HANDLER);
// @see http://stackoverflow.com/a/9084110/126431
ob_start();
// start buffering
$graph->img->Stream();
// print data to buffer
$graphData = ob_get_contents();
// retrieve buffer contents
ob_end_clean();
开发者ID:Kenovix,项目名称:san-miguel,代码行数:31,代码来源:imprimainformepro.php

示例3: Graph

     $p1->SetCSIMTargets($chartImageMapLinks, $chartImageMapAlts, $chartImageMapTargets);
     // Set label format
     if ($content['showpercent'] == 1) {
         $p1->SetLabelType(0);
         $p1->value->SetFormat("%d%%");
     } else {
         $p1->SetLabelType(1);
         $p1->value->SetFormat("%d");
     }
     // Set label properties
     $p1->SetLabelPos(1.0);
     $p1->SetSliceColors(array('#FFF584', '#CBFF84', '#FF6B9E', '#FF9584', '#EAFF84', '#7BFF51', '#51FFA6', '#51FF52', '#6BCFFF', '#5170FF', '#519CFF', '#EAE3AD', '#FFF184', '#8584FF', '#E698FF', '#C384FF', '#FF84EC', '#FF98A3', '#E5C285', '#FFDA98'));
     $p1->value->SetFont(FF_VERA, FS_NORMAL, 8);
     $p1->value->SetColor("black");
     // Adjust other Pie Properties
     $p1->SetLabelMargin(5);
     $p1->SetCenter(0.4, 0.65);
     $p1->SetSize(0.3);
     $p1->SetAngle(60);
     $graph->Add($p1);
 } else {
     if ($content['chart_type'] == CHART_BARS_VERTICAL) {
         // Include additional code filers for this chart!
         include_once $gl_root_path . "classes/jpgraph/jpgraph_bar.php";
         include_once $gl_root_path . "classes/jpgraph/jpgraph_line.php";
         // Create Basic Image, and set basic properties!
         $graph = new Graph($content['chart_width'], $content['chart_width'], 'auto');
         $graph->SetMargin(60, 20, 30, 50);
         // Adjust margin area
         $graph->SetScale("textlin");
         $graph->SetMarginColor('white');
开发者ID:czhujer,项目名称:Adiscon-LogAnalyzer,代码行数:31,代码来源:chartgenerator.php

示例4: pie_single_mailbox_user

function pie_single_mailbox_user()
{
    $tpl = new Templates();
    $users = new usersMenus();
    $uid = $_SESSION["uid"];
    if ($users->cyrus_imapd_installed == 0) {
        return null;
    }
    $ldap = new clladp();
    $hash = $ldap->UserDatas($_SESSION["uid"]);
    if ($hash["MailboxActive"] != 'TRUE') {
        return null;
    }
    $cyrus = new cyrus();
    $res = $cyrus->get_quota_array($uid);
    $size = $cyrus->MailboxInfosSize($uid);
    $free = $cyrus->USER_STORAGE_LIMIT - $cyrus->USER_STORAGE_USAGE;
    if (!$cyrus->MailBoxExists($uid)) {
        return null;
    }
    $USER_STORAGE_USAGE = $cyrus->USER_STORAGE_USAGE;
    $USER_STORAGE_LIMIT = $cyrus->USER_STORAGE_LIMIT;
    $FREE = $free;
    writelogs("USER_STORAGE_USAGE={$USER_STORAGE_USAGE}", __FUNCTION__, __FILE__);
    writelogs("STORAGE_LIMIT={$USER_STORAGE_LIMIT}", __FUNCTION__, __FILE__);
    if ($USER_STORAGE_LIMIT == null) {
        $USER_STORAGE_LIMIT = 1000000;
        $USER_STORAGE_USAGE = 0;
        $FREE = $USER_STORAGE_LIMIT;
    }
    $USER_STORAGE_RESTANT = $USER_STORAGE_LIMIT - $USER_STORAGE_USAGE;
    if ($USER_STORAGE_RESTANT > 1) {
        $reste = round($USER_STORAGE_RESTANT / 1024);
        $data = array($USER_STORAGE_USAGE, $USER_STORAGE_RESTANT);
    } else {
        $data = array($USER_STORAGE_USAGE);
    }
    $title = $tpl->_ENGINE_parse_body("{your mailbox usage} ({$reste} mb free)");
    writelogs("USER_STORAGE_USAGE={$USER_STORAGE_USAGE} - USER_STORAGE_LIMIT={$USER_STORAGE_LIMIT} FREE={$FREE}", __FUNCTION__, __FILE__);
    $date = date('Y-m-d');
    $textes = array();
    $donnees = array();
    $zlabel = array();
    $date = date('Y-m-d');
    $donnees[] = $FREE;
    $textes[] = "{$FREE} Free";
    $donnees[] = $USER_STORAGE_USAGE;
    $textes[] = "{$USER_STORAGE_USAGE} used";
    $data = $donnees;
    $graph = new PieGraph(370, 350, 'auto');
    //$graph->SetShadow();
    $graph->title->Set($title);
    $graph->title->SetFont(FF_FONT1, FS_BOLD);
    $p1 = new PiePlot3D($data);
    $p1->SetLabels($textes, 1);
    $p1->SetEdge('black', 0);
    $p1->SetAngle(55);
    $p1->SetLabelMargin(2);
    $p1->SetCenter(0.4, 0.5);
    $p1->ExplodeAll(10);
    $graph->Add($p1);
    $graph->SetFrame(false);
    $graph->StrokeCSIM();
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:64,代码来源:users.charts.php


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