甘特图
甘特图是一种用于项目管理的强大工具。它直观地表示了项目进度表,让管理人员和团队成员对整个项目的开始和结束日期一目了然。该图沿着水平时间轴显示任务或活动,显示每个任务的持续时间、它们的顺序以及它们是如何重叠或同时运行的。 在甘特图中,每个任务由一个条形图表示,其长度和位置反映了任务的开始日期、持续时间和结束日期。这种格式便于理解任务之间的依赖关系,即一项任务必须在另一项任务开始之前完成。此外,甘特图还可包括里程碑,即项目时间轴上的重要事件或目标,并以明显的符号标出。 在创建甘特图方面,PlantUML有几个优势。它提供了一种基于文本的图表创建方法,便于使用版本控制系统跟踪更改。这种方法对于已经习惯了基于文本的编码环境的团队尤其有利。PlantUML 的甘特图语法简单明了,可以快速修改和更新项目时间表。此外,PlantUML 与其他工具的集成,以及从文本动态生成图表的能力,使其成为希望自动化和简化项目管理文档的团队的多功能选择。因此,使用 PlantUML 制作甘特图,可将可视化项目规划的清晰度和效率与基于文本系统的灵活性和控制性结合起来。
声明任务
甘特图用自然的语言描述,使用非常简单的句子(主谓补)。
任务用方括号定义。
工作量
使用动词requires指定每项任务的工作量,工作量通过天数表示
|
🎉 Copied!
|
|
一周通常被理解为七天的时间跨度。但是,若某些天被指定为"关闭的"(如周末),一周也可以被重新定义为"非关闭的"天。例如,如果周六和周日被标记为关闭的,那么在这种情况下,一周就相当于五天的工作量,即剩余的工作日。
开始
它们的开头用start 动词定义:
|
🎉 Copied!
|
|
|
🎉 Copied!
|
|
[参考
D+nn 形式:QA-14494]
结束
其结束用end 动词定义:
|
🎉 Copied!
|
|
|
🎉 Copied!
|
|
开始/结束
可以通过指定日期来绝对定义两者:
|
🎉 Copied!
|
|
|
🎉 Copied!
|
|
单行声明(用and连词)
可以将声明与and 连词组合在一行。
|
🎉 Copied!
|
|
添加限制条件
可以在任务之间添加限制条件。
|
🎉 Copied!
|
|
|
🎉 Copied!
|
|
短名称
可以用as 关键字为任务定义短名称。
|
🎉 Copied!
|
|
WARNING
This translation need to be updated. WARNING
Tasks with same name
[Starting with V1.2024.6,] it is possible to have multiple tasks with same name.
|
🎉 Copied!
|
|
|
🎉 Copied!
|
|
[Ref. QA-12176 and GH-1809]
自定义颜色
也可以通过is colored in## 自定义 颜色。
|
🎉 Copied!
|
|
完成状态
添加完成百分比
可以通过命令设置任务的完成状态:is xx% completedis xx% complete
|
🎉 Copied!
|
|
更改完成度颜色(按样式)
|
🎉 Copied!
|
|
[参考QA-8297] [Ref. QA-15299]
WARNING
This translation need to be updated. WARNING
里程碑
您可以使用happen verb 定义里程碑。
相对里程### 碑(使用限制条件)
|
🎉 Copied!
|
|
绝对里程碑(使用固定日期)
|
🎉 Copied!
|
|
任务最长结束时间里程碑
|
🎉 Copied!
|
|
[参考QA-10764]
超链接
您可以为任务添加超链接。
|
🎉 Copied!
|
|
日历
您可以为整个项目指定一个开始日期。默认情况下,第一个任务从该日期开始。
|
🎉 Copied!
|
|
着色日
可以为某些日子添加颜色。
|
🎉 Copied!
|
|
更改尺度
您可以使用以下参数之一更改超长项目的尺度:
- printscale
- ganttscale
- projectcale
- daily (默认)
- weekly
- monthly
- quarterly
- yearly
Daily (默认)
|
🎉 Copied!
|
|
每周
|
🎉 Copied!
|
|
|
🎉 Copied!
|
|
每月
|
🎉 Copied!
|
|
每季度
|
🎉 Copied!
|
|
|
🎉 Copied!
|
|
每年
|
🎉 Copied!
|
|
Date range with between
不带时间范围
|
🎉 Copied!
|
|
带时间范围
|
🎉 Copied!
|
|
缩放(以所有比例尺为例)
可以使用参数更改缩放:
zoom <integer>
周标尺缩放
无缩放
|
🎉 Copied!
|
|
有缩放
|
🎉 Copied!
|
|
[Ref.QA-13725]
按周缩放不缩放
|
🎉 Copied!
|
|
有缩放
|
🎉 Copied!
|
|
在### 月比例尺上缩放
不缩放
|
🎉 Copied!
|
|
带缩放
|
🎉 Copied!
|
|
按### 季度缩放
不带缩放功能
|
🎉 Copied!
|
|
带缩放
|
🎉 Copied!
|
|
按年缩放
不带缩放功能
|
🎉 Copied!
|
|
带缩放
|
🎉 Copied!
|
|
WARNING
This translation need to be updated. WARNING
Weekscale with Weeknumbers or Calendar Date
With Weeknumbers (by default)
|
🎉 Copied!
|
|
With Weeknumbers (starting from 1)
|
🎉 Copied!
|
|
[Ref. GH-525]
With specific Weeknumbers (starting from n [including negative integer])
|
🎉 Copied!
|
|
|
🎉 Copied!
|
|
[Ref. GH-2202]
With Calendar Date
|
🎉 Copied!
|
|
[Ref. QA-11630]
Change first day of week
|
🎉 Copied!
|
|
[Ref. QA-11630]
Close day
It is possible to close some day.
|
🎉 Copied!
|
|
Then it is possible to open some closed day.
|
🎉 Copied!
|
|
Definition of a week depending of closed days
A week is a synonym for how many non-closed days are in a week, as:
|
🎉 Copied!
|
|
So if you specify Saturday and Sunday as closed, a week will be equivalent to 5 days, as:
|
🎉 Copied!
|
|
[Ref. QA-13434]
Working days
It is possible to manage working days.
|
🎉 Copied!
|
|
[Ref. QA-16188]
Simplified task succession
It's possible to use the then keyword to denote consecutive tasks.
|
🎉 Copied!
|
|
You can also use arrow
->
|
🎉 Copied!
|
|
Working with resources
You can affect tasks on resources using the on keyword and brackets for resource name.
|
🎉 Copied!
|
|
Multiple resources can be assigned to a task:
|
🎉 Copied!
|
|
Resources can be marked as off on specific days:
|
🎉 Copied!
|
|
Hide resources
Without any hiding (by default)
|
🎉 Copied!
|
|
Hide resources names
You can hide resources names and percentage, on tasks, using thehide resources names keywords.
|
🎉 Copied!
|
|
Hide resources footbox
You can also hide resources names on bottom of the diagram using the hide resources footbox keywords.
|
🎉 Copied!
|
|
Hide the both (resources names and resources footbox)
You can also hide the both.
|
🎉 Copied!
|
|
水平分隔符
您可以使用-- 来分隔任务集。
|
🎉 Copied!
|
|
Vertical Separator
You can add Vertical Separators with the syntax: Separator just [at].
|
🎉 Copied!
|
|
[Ref. QA-16247]
Complex example
It also possible to use the and conjunction.
You can also add delays in constraints.
|
🎉 Copied!
|
|
Comments
As is mentioned on Common Commands page:
Everything that starts with(i.e.: the first character (except space character) of a comment line must be asimple quote 'is a comment. You can also put comments on several lines using/'to start and'/to end.
simple quote ')
|
🎉 Copied!
|
|
Using style
Without style (by default)
|
🎉 Copied!
|
|
With style
You can use style to change rendering of elements.
|
🎉 Copied!
|
|
[Ref. QA-10835, QA-12045, QA-11877 and PR-438]
With style (full example)
|
🎉 Copied!
|
|
DONE
Thanks for style for Separator and all style for Arrow (thickness...)
Clean style
With style, you can also clean a Gantt diagram (showing tasks, dependencies and relative durations only - but no actual start date and no actual scale):
|
🎉 Copied!
|
|
[Ref. QA-13971]
Or:
|
🎉 Copied!
|
|
[Ref. QA-13464]
添加注释
|
🎉 Copied!
|
|
有重叠的例子。
|
🎉 Copied!
|
|
|
🎉 Copied!
|
|
完成
谢谢你在重叠时的修正(#386在v1.2020.18上)。
|
🎉 Copied!
|
|
Pause tasks
|
🎉 Copied!
|
|
Change link colors
You can change link colors:
- with this syntax:
with <color> <style> link
|
🎉 Copied!
|
|
- or directly by using arrow style
|
🎉 Copied!
|
|
[Ref. QA-13693]
Tasks or Milestones on the same line
You can put Tasks or Milestones on the same line, with this syntax:
[T|M] displays on same row as [T|M]
|
🎉 Copied!
|
|
今天的亮点
|
🎉 Copied!
|
|
Task between two milestones
|
🎉 Copied!
|
|
Grammar and verbal form
| Verbal form | Example |
| [T] starts | |
| [M] happens |
Add title, header, footer, caption or legend
|
🎉 Copied!
|
|
(See also: Common commands)
Add color on legend
|
🎉 Copied!
|
|
[Ref. QA-19021]
移除脚盒(所有比例的例子)
你可以使用hide footbox 关键字来移除甘特图的脚盒
- (与顺序图*一样)。
- 每日规模(没有项目开始)
|
🎉 Copied!
|
|
- 日线图
|
🎉 Copied!
|
|
- 周尺度
|
🎉 Copied!
|
|
- 月度规模
|
🎉 Copied!
|
|
- 季度表
|
🎉 Copied!
|
|
- 年度规模
|
🎉 Copied!
|
|
日历的语言
你可以选择甘特日历的语言,用 language <xx>命令,其中 <xx>是语言的ISO 639代码。
英语(en,默认)。
|
🎉 Copied!
|
|
Deutsch (de)
|
🎉 Copied!
|
|
日语 (ja)
|
🎉 Copied!
|
|
Chinese (zh)
|
🎉 Copied!
|
|
Korean (ko)
|
🎉 Copied!
|
|
删除任务或里程碑
您可以将某些任务或里程碑标记为deleted ,而不是正常完成,以区分可能已被丢弃、推迟或其他的任务。
|
🎉 Copied!
|
|
[参考QA-9129]
Start a project, a task or a milestone a number of days before or after today
You can start a project, a task or a milestone a number of days before or after today, using the builtin functions %now and %date:
|
🎉 Copied!
|
|
[Ref. QA-16285]
Change Label position
The labels are near elements (by default)
|
🎉 Copied!
|
|
To change the label position, you can use the command
label:
Label on first column
- Left aligned
|
🎉 Copied!
|
|
- Right aligned
|
🎉 Copied!
|
|
Label on last column
- Left aligned
|
🎉 Copied!
|
|
- Right aligned
|
🎉 Copied!
|
|
[Ref. QA-12433]
Definition of a month (30 days)
A month is a synonym for 30 days.
|
🎉 Copied!
|
|
[Ref. QA-14494]