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


PHP GanttGraph::setMargin方法代码示例

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


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

示例1: GanttGraph

$imgfilename = 'auto';
$graph = new GanttGraph($main_width - 10, 0, $imgfilename, 1);
$graph->SetMarginColor('#C4C4C4');
$graph->SetColor('white');
$graph->SetFrame(true, 'gray', 1);
$graph->ShowHeaders(GANTT_HHOUR);
$graph->scale->UseWeekendBackground(false);
$graph->scale->hour->SetBackgroundColor('lightyellow:1.5');
$graph->scale->hour->SetSundayFontColor('black');
$graph->scale->day->SetBackgroundColor('lightyellow:1.5');
$graph->scale->day->SetSundayFontColor('black');
$graph->scale->hour->SetFont(FF_FONT1);
$graph->scale->hour->SetIntervall(1);
$graph->scale->hour->SetStyle(HOURSTYLE_H24);
$graph->hgrid->SetRowFillColor('whitesmoke@0.9', 'darkblue@0.9');
$graph->setMargin(0, 0, 0, 20);
$graph->scale->hour->SetFont(FF_FONT1);
$graph->scale->day->SetFont(FF_FONT1, FS_BOLD);
$graph->title->SetColor('white');
$graph->scale->UseWeekendBackground(false);
$graph->scale->day->SetWeekendColor('lightyellow:1.5');
$graph->scale->week->SetFont(FF_FONT1);
$graph->hgrid->Show(true);
$graph->hgrid->SetRowFillColor('whitesmoke@0.9', 'darkblue@0.9');
if ($suma > 0) {
    for ($i = 0; $i < count($data); ++$i) {
        $bar = new GanttBar($data[$i][0], $data[$i][1], $data[$i][2], $data[$i][3]);
        $bar->SetPattern(BAND_RDIAG, 'lightgray');
        $bar->SetFillColor('brown');
        $bar->SetShadow(true, 'black@0.5');
        $graph->Add($bar);
开发者ID:redrock,项目名称:xlrstats-web-v2,代码行数:31,代码来源:inc_activitygraph.php

示例2: array

        $data[] = array($d[$d1] - 1, date("Y-m-d", $start), date("H:i", $start), $d2 <= $d1 ? date("H:i", $end) : "23:59", $start);
    }
}
if (!$data) {
    // fake 1 record so the chart doesn't error
    $data[] = array(0, date("Y-m-d"), '00:00', '00:00', time());
}
// remove any and all output buffers
$ps->ob_clean();
$graph = new GanttGraph(0, 0, $imgfilename, CACHE_TIMEOUT);
$showfooter = (bool) $styles->val('image.session.showfooter', 'image.common.footer.show');
$top = intval($styles->val('image.session.margin.top', 'image.common.margin.top', true));
$right = intval($styles->val('image.session.margin.right', 'image.common.margin.right', true));
$bottom = intval($styles->val('image.session.margin.bottom', 'image.common.margin.bottom', true));
$left = intval($styles->val('image.session.margin.left', 'image.common.margin.left', true));
$graph->setMargin($left, $right, $top, ($showfooter and $bottom < 14) ? 14 : $bottom);
$graph->ShowHeaders(GANTT_HHOUR);
//$graph->SetBackgroundGradient('gray','whitesmoke',GRAD_LEFT_REFLECTION,BGRAD_MARGIN);
$graph->SetMarginColor($styles->val('image.session.frame.margin', '#C4C4C4', true));
$graph->SetFrame(true, $styles->val('image.session.frame.color', 'gray', true), $styles->val('image.session.frame.width', 1, true));
//if (!$noname) $graph->title->Set($plrname);
//$graph->title->SetColor('blue');
//$graph->subtitle->Set(imgdef($s['frame']['title'], 'Player Sessions'));
//$graph->subtitle->SetFont(constant(imgdef($s['@frame']['font'], 'FF_FONT0')));
// must override the weekend settings ...
$graph->scale->UseWeekendBackground(false);
$graph->scale->day->SetWeekendColor($styles->val('image.session.header.bgcolor', 'lightyellow:1.5', true));
$graph->scale->day->SetFontColor($styles->val('image.session.header.color', 'black', true));
$graph->scale->day->SetSundayFontColor($styles->val('image.session.header.color', 'black', true));
// match the weekend settings ...
$graph->scale->hour->SetFontColor($styles->val('image.session.header.color', 'black', true));
开发者ID:Nerus87,项目名称:PsychoStats,代码行数:31,代码来源:imgsess.php


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