图示
甘特图代码
import matplotlib.pyplot as plt
import numpy as np
class ProjectEmement:
def __init__(self, name_, starttime_: float, endtime_: float, fact_endtime_: float, grade_, rootlist_: list, keylist_: list, isover_=-1):
self.name = name_
self.starttime = starttime_
self.endtime = endtime_
self.fact_endtime = fact_endtime_
self.grade = grade_
self.rootlist = rootlist_
self.keylist = keylist_
self.isover = isover_
self.preprocess()
pass
def preprocess(self):
self.starttime = min(self.starttime, self.endtime)
self.fact_endtime = max(self.starttime, self.fact_endtime)
self.costtime = self.fact_endtime - self.starttime
pass
class GanttImage:
def __init__(self, elementlist_: list):
self.elementlist = elementlist_
self