本文整理汇总了PHP中GanttBar::setFillColor方法的典型用法代码示例。如果您正苦于以下问题:PHP GanttBar::setFillColor方法的具体用法?PHP GanttBar::setFillColor怎么用?PHP GanttBar::setFillColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GanttBar
的用法示例。
在下文中一共展示了GanttBar::setFillColor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: executeGanttChart
/**
* Executes ganttChart action
*
*/
public function executeGanttChart()
{
//@todo change color according to status, and add a legend
$this->forward404Unless($project = ProjectPeer::retrieveBySlug($this->getRequestParameter('project')));
$w = 450;
$graph = new sfJpGraph('gantt', 0, 0);
$graph = $graph->getJpGraph();
$graph->SetShadow();
// Add title and subtitle
$graph->title->Set($project->getTitle());
//$graph->title-> SetFont( FF_ARIAL, FS_BOLD,12);
$graph->subtitle->Set("(Gantt Chart)");
// Show day, week and month scale
$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH);
// Instead of week number show the date for the first day in the week
// on the week scale
$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY);
// Make the week scale font smaller than the default
$graph->scale->week->SetFont(FF_FONT0);
// Use the short name of the month together with a 2 digit year
// on the month scale
$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR2);
// Use the short name of the month together with a 4 digit year
// on the month scale
$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4);
//$graph->scale-> month-> SetTextColor( "white");
$graph->scale->month->SetBackgroundColor("blue");
$row = 0;
foreach ($project->getTasks() as $task) {
$activity = new GanttBar($row, $task->getName(), $task->getBegin('Y-m-d'), $task->getFinish('Y-m-d'));
$activity->SetPattern(BAND_RDIAG, "red");
$activity->setFillColor("blue");
// Finally add the bar to the graph
$graph->Add($activity);
$row++;
}
// ... and display it
$graph->Stroke();
}