class Crit_Report(report.Critical): data = project def make_report(self, data): for t in data: yield (t.indent_name(), t.start, t.end, t.buffer) class Crit_Gantt(gantt.Critial): data = project
start = max(up.installation.end, Date("2005-2-18"))
. Now the
the critical report and gantt look like figure 2.5.
There is no critical task anymore. Next we change our report and gantt, to also
highlight tasks, which may become critical, because their buffer is quite short.
We change the new definitions to:
class Crit_Report(report.Critical): data = project colors = { 0:"red", "5d" : "orange" } def make_report(self, data): for t in data: yield (t.indent_name(), t.start, t.end, t.buffer) class Crit_Gantt(gantt.Critial): data = project colors = { 0:"red", "5d" : "orange" }
colors = 0:"red", "5d" : "orange"
mean: Tasks with
a buffer of 0 will be red, Tasks with a buffer less or equal than 5 days will
be orange. The result looks like figure 2.6.