needgantt¶
New in version 0.5.5.
needgantt
adds a gantt-chart to your documentation:
.. needgantt:: Bug handling gantt
:tags: gantt_example
:milestone_filter: type == 'milestone'
Show used needs for above example…
Hint
The Gantt function is quite new in PlantUML and some features are available in the Beta version only. So if you get any syntax errors during the build, please download the latest PlantUML version.
If svg
is set as output format for PlantUML, the tasks elements are linked to their related need.
Color is taken from needs_types configuration. This behavior can be deactivated by setting no_color.
needgantt
supports the following relationship between tasks and milestones:
starts with: see starts_with_links
starts after: see starts_after_links
ends with: see ends_with_links
The task length is defined by default by the need-option duration. Its value is interpreted in days.
The task completion is defined by default by the need-option completion. Its value is interpreted as percentage and should be between 0 and 100.
Options¶
Supported options:
milestone_filter¶
milestone_filter
gets executed on each need found by filter
or any user related filter option.
If it is a match, the gets represented as milestone instead of a task in gantt chart.
milestone_filter
must be a valid Filter string.
starts_with_links¶
List of link names, which shall be used to define task relationship starts_with
.
Default: None
.. needgantt:: Starts_with example
:tags: gantt_ex_starts_with
:starts_with_links: starts_with
starts_after_links¶
List of link names, which shall be used to define task relationship starts_after
.
Default: links
.. needgantt:: Starts_after example
:tags: gantt_ex_starts_after
:starts_after_links: starts_after
ends_with_links¶
List of link names, which shall be used to define task relationship ends_with
.
Default: None
.. needgantt:: Ends_with example
:tags: gantt_ex_ends_with
:ends_with_links: ends_with
start_date¶
Optional start date of the gantt chart. All tasks and milestones dates get calculated based on this base values.
Must be use the format YYYY-MM-DD
. Example: 2020-03-25
.. needgantt:: Bug handling gantt
:tags: gantt_example
:milestone_filter: type == 'milestone'
:start_date: 2020-03-25
timeline¶
Defines the timeline scale.
Allowed values: daily
, weekly
, monthly
.
Default: daily
Works only, if start_date is set as well.
.. needgantt:: Bug handling gantt
:tags: gantt_example
:milestone_filter: type == 'milestone'
:start_date: 2020-03-25
:timeline: weekly
no_color¶
Tasks and milestone color is taken from need-typ configuration.
If the default PlantUML colors shall be taken, set this flag.
duration_option¶
Defines which option to take for a duration value. The value gets interpreted in days, no matter what the name of the option is.
Can be set for the complete documentation by using needs_duration_option in conf.py
.
Default: duration
.. needgantt:: Duration example
:tags: gantt_ex_duration
:duration_option: hours
|
completion_option¶
Defines which option to take for a completion value. The value gets interpreted in percentage.
Can be set for the complete documentation by using needs_completion_option in conf.py
.
Default: completion
.. needgantt:: Completion example
:tags: gantt_ex_completion
:completion_option: amount