/** * @param $task Task * @param $start_date string * @param $end_date string * @param $position int * @return GanttBar * * Creates a normal GanttBar for a task, and adds an overlay showing the current progress * @todo make colours themeable */ private function makeNormalbar(Task $task, $start_date, $end_date, $position) { $bar = new GanttBar($position, $task->name, $start_date, $end_date, $task->getField('duration')->formatted, 15); $bar->setPattern(BAND_SOLID, '#0077BD'); $bar->SetFillColor('#0077BD'); $bar->progress->Set($task->progress / 100); $bar->progress->SetPattern(BAND_RDIAG, '#0077BD', 70); $bar->progress->SetFillColor('#ffffff'); $bar->setShadow(); return $bar; }