# -*- coding:utf-8 -*- # pip install plotly -i https://pypi.tuna.tsinghua.edu.cn/simple import plotly as py import plotly.figure_factory as ff pyplt = py.offline.plot ### test1 df = [dict(Task = "项目1", Start = '2015-02-05', Finish = '2019-08-28'), dict(Task="项目4", Start='2019-09-05', Finish='2022-05-25'), dict(Task = "项目2", Start = '2019-09-05', Finish = '2022-05-25'), dict(Task = "项目3", Start = '2022-05-26', Finish = '2023-04-17'), ] fig = ff.create_gantt(df) pyplt(fig, filename='t1.html') # 貌似只能存为 html 文件
标签:Finish,05,python,甘特图,Start,Task,dict,2019 From: https://www.cnblogs.com/jingzaixin/p/17352188.html