Диаграмма Ганта

Диаграмма Ганта- это мощный инструмент, используемый для управления проектами. Она наглядно представляет график проекта, позволяя руководителям и членам команды сразу увидеть даты начала и окончания всего проекта. Диаграмма отображает задачи или виды деятельности вдоль горизонтальной оси времени, показывая продолжительность каждой задачи, их последовательность, а также то, как они пересекаются или выполняются одновременно.

На диаграмме Ганта каждая задача представлена в виде столбика, длина и положение которого отражают дату начала, продолжительность и дату окончания задачи. Такой формат позволяет легко понять зависимость между задачами, когда одна задача должна быть завершена до начала выполнения другой. Кроме того, диаграммы Ганта могут включать вехи- значимые события или цели на временной шкале проекта, обозначенные отдельным символом.

В контексте создания диаграмм Ганта PlantUML обладает рядом преимуществ. Он обеспечивает текстовый подход к созданию диаграмм, что позволяет легко отслеживать изменения с помощью систем контроля версий. Такой подход особенно удобен для команд, которые уже привыкли к текстовым средам кодирования. Синтаксис диаграмм Ганта в PlantUML прост, что позволяет быстро вносить изменения и дополнения в график проекта. Кроме того, интеграция PlantUML с другими инструментами и способность динамически генерировать диаграммы из текста делают его универсальным выбором для команд, стремящихся автоматизировать и упорядочить документацию по управлению проектами. Таким образом, использование PlantUML для диаграмм Ганта сочетает в себе наглядность и эффективность визуального планирования проекта с гибкостью и управляемостью текстовой системы.

Объявление задач

Гантт описывается на естественном языке, с использованием очень простых предложений (субъект-глагол-комплимент).

Задачи определяются с помощью квадратных скобок.

Объем работы

Объем работы для каждой задачи задается с помощью глагола requires, указывающего на объем необходимой работы в днях.

🎉 Copied!

@startgantt
[Prototype design] requires 15 days
[Test prototype] requires 10 days
-- All example --
[Task 1 (1 day)] requires 1 day
[T2 (5 days)] requires 5 days
[T3 (1 week)] requires 1 week
[T4 (1 week and 4 days)] requires 1 week and 4 days
[T5 (2 weeks)] requires 2 weeks
@endgantt

Под неделей обычно понимается промежуток времени, состоящий из семи дней. Однако в условиях, когда некоторые дни считаются "закрытыми" (например, выходные), неделя может быть переформулирована в терминах "незакрытых" дней. Например, если суббота и воскресенье обозначены как закрытые, то неделя в данном контексте будет равна пятидневной рабочей нагрузке, соответствующей оставшимся дням недели.

Начало

Их начало определяется с помощью глагола start:

🎉 Copied!

@startgantt
[Prototype design] requires 15 days
[Test prototype] requires 10 days

Project starts 2020-07-01
[Prototype design] starts 2020-07-01
[Test prototype] starts 2020-07-16
@endgantt

🎉 Copied!

@startgantt
[Prototype design] requires 15 days
[Test prototype] requires  10 days

[Prototype design] starts D+0
[Test prototype] starts D+15
@endgantt

[Ссылка на форму D+nn: QA-14494]

Конец

Их окончание определяется с помощью глагола end:

🎉 Copied!

@startgantt
[Prototype design] requires 15 days
[Test prototype] requires 10 days

Project starts 2020-07-01
[Prototype design] ends 2020-07-15
[Test prototype] ends 2020-07-25
@endgantt

🎉 Copied!

@startgantt
[Prototype design] requires 15 days
[Test prototype] requires 10 days

[Prototype design] ends D+14
[Test prototype] ends D+24
@endgantt

Start/End

Можно определить оба абсолютно, указав даты:

🎉 Copied!

@startgantt
Project starts 2020-07-01
[Prototype design] starts 2020-07-01
[Test prototype] starts 2020-07-16
[Prototype design] ends 2020-07-15
[Test prototype] ends 2020-07-25

@endgantt

🎉 Copied!

@startgantt
[Prototype design] starts D+0
[Test prototype] starts D+15
[Prototype design] ends D+14
[Test prototype] ends D+24
@endgantt

Однострочное объявление (с конъюнкцией and)

Возможно объединение объявления в одной строке с конъюнкцией and.

🎉 Copied!

@startgantt
Project starts 2020-07-01
[Prototype design] starts 2020-07-01 and ends 2020-07-15
[Test prototype] starts 2020-07-16 and requires 10 days
@endgantt

Добавление ограничений

Существует возможность добавления ограничений между задачами.

🎉 Copied!

@startgantt
[Prototype design] requires 15 days
[Test prototype] requires 10 days
[Test prototype] starts at [Prototype design]'s end
@endgantt

🎉 Copied!

@startgantt
[Prototype design] requires 10 days
[Code prototype] requires 10 days
[Write tests] requires 5 days
[Code prototype] starts at [Prototype design]'s end
[Write tests] starts at [Code prototype]'s start
@endgantt

Короткие имена и псевдонимы задач (алиасы)

С помощью ключевого слова as можно определить короткое имя для задач.

🎉 Copied!

@startgantt
[Prototype design] as [D] requires 15 days
[Test prototype] as [T] requires 10 days
[T] starts at [D]'s end
@endgantt

Задачи с одинаковыми наименованиями

[Начиная с версии V1.2024.6], появилась возможность создавать задачи с одинаковыми наименованиями.

🎉 Copied!

@startgantt
Project starts 2020-11-08
[Task 7 days] as [T7] starts at 2020-11-09
[T7] ends at 2020-11-15
[Task 7 days] as [T7bis] starts at 2020-11-09
[T7bis] ends at 2020-11-15
@endgantt

🎉 Copied!

@startgantt
[SameTaskName] as [T1] lasts 7 days and is colored in pink
[SameTaskName] as [T2] lasts 3 days and is colored in orange
[T1] -> [T2]
@endgantt

[См. QA-12176 и GH-1809]

Настройка цветов

Также возможна настройка цветов с помощью is colored in.

🎉 Copied!

@startgantt
[Prototype design] requires 13 days
[Test prototype] requires 4 days
[Test prototype] starts at [Prototype design]'s end
[Prototype design] is colored in Fuchsia/FireBrick
[Test prototype] is colored in GreenYellow/Green
@endgantt

Статус завершения

Добавление процента зависимости завершения

Вы можете установить статус завершения задания с помощью команды:
  • is xx% completed
  • is xx% complete

🎉 Copied!

@startgantt
[foo] requires 21 days
[foo] is 40% completed
[bar] requires 30 days and is 10% complete
@endgantt

Изменить цвет завершения (при помощи модуля <style>)

🎉 Copied!

@startgantt

<style>
ganttDiagram {
  task {
    BackGroundColor GreenYellow
    LineColor Green 
    unstarted {
      BackGroundColor Fuchsia 
      LineColor FireBrick
    }
  }
}
</style>

[Prototype design] requires 7 days
[Test prototype 0] requires 4 days
[Test prototype 10] requires 4 days
[Test prototype 20] requires 4 days
[Test prototype 30] requires 4 days
[Test prototype 40] requires 4 days
[Test prototype 50] requires 4 days
[Test prototype 60] requires 4 days
[Test prototype 70] requires 4 days
[Test prototype 80] requires 4 days
[Test prototype 90] requires 4 days
[Test prototype 100] requires 4 days

[Test prototype 0] starts at [Prototype design]'s end
[Test prototype 10] starts at [Prototype design]'s end
[Test prototype 20] starts at [Prototype design]'s end
[Test prototype 30] starts at [Prototype design]'s end
[Test prototype 40] starts at [Prototype design]'s end
[Test prototype 50] starts at [Prototype design]'s end
[Test prototype 60] starts at [Prototype design]'s end
[Test prototype 70] starts at [Prototype design]'s end
[Test prototype 80] starts at [Prototype design]'s end
[Test prototype 90] starts at [Prototype design]'s end
[Test prototype 100] starts at [Prototype design]'s end

[Test prototype 0] is 0% complete
[Test prototype 10] is 10% complete
[Test prototype 20] is 20% complete
[Test prototype 30] is 30% complete
[Test prototype 40] is 40% complete
[Test prototype 50] is 50% complete
[Test prototype 60] is 60% complete
[Test prototype 70] is 70% complete
[Test prototype 80] is 80% complete
[Test prototype 90] is 90% complete
[Test prototype 100] is 100% complete

@endgantt

[Ref. QA-8297]

Изменение цвета незаконченной части задачи (при помощи модуля <style>)

🎉 Copied!

@startgantt
<style>
ganttDiagram {
  task {
    BackGroundColor GreenYellow
    LineColor Green 
  }
  undone {
    BackGroundColor red
  }
}
</style>

[foo] lasts 21 days
[foo] is 40% completed
[bar] lasts 30 days and is 10% complete
@endgantt

[Ref. QA-15299]

Вехи

Вы можете определить вехи с помощью команды happen.

Относительная веха (использование ограничений)

🎉 Copied!

@startgantt
[Test prototype] requires 10 days
[Prototype completed] happens at [Test prototype]'s end
[Setup assembly line] requires 12 days
[Setup assembly line] starts at [Test prototype]'s end
@endgantt

Абсолютная веха (использование фиксированной даты)

🎉 Copied!

@startgantt
Project starts 2020-07-01
[Test prototype] requires 10 days
[Prototype completed] happens 2020-07-10
[Setup assembly line] requires 12 days
[Setup assembly line] starts at [Test prototype]'s end
@endgantt

Веха максимального завершения задач

🎉 Copied!

@startgantt
[Task1] requires 4 days
then [Task1.1] requires 4 days
[Task1.2] starts at [Task1]'s end and requires 7 days

[Task2] requires 5 days
then [Task2.1] requires 4 days

[MaxTaskEnd] happens at [Task1.1]'s end
[MaxTaskEnd] happens at [Task1.2]'s end
[MaxTaskEnd] happens at [Task2.1]'s end

@endgantt

[Ref. QA-10764]

Гиперссылки

Вы можете добавлять гиперссылки в задачи.

🎉 Copied!

@startgantt
[task1] requires 10 days
[task1] links to [[http://plantuml.com]]
@endgantt

Календарь

Вы можете указать дату начала выполнения всего проекта. По умолчанию первая задача начинается с этой даты.

🎉 Copied!

@startgantt
Project starts the 20th of september 2017
[Prototype design] as [TASK1] requires 13 days
[TASK1] is colored in Lavender/LightBlue
@endgantt

Раскраска дней

Можно добавить цвета в некоторые дни.

🎉 Copied!

@startgantt
Project starts the 2020/09/01 

2020/09/07 is colored in salmon
2020/09/13 to 2020/09/16 are colored in lightblue

[Prototype design] as [TASK1] requires 22 days
[TASK1] is colored in Lavender/LightBlue
[Prototype completed] happens at [TASK1]'s end
@endgantt

Календарные шкалы

Вы можете изменить масштаб для очень длинного проекта, используя один из этих параметров:
  • printscale
  • ganttscale
  • projectcale
и одно из значений:
  • daily — дневная шкала(по умолчанию)
  • weekly — недельная
  • monthly — месячная
  • quarterly — квартальная
  • yearly — годовая.

(См. QA-11272, QA-9041 и QA-10948)

Дневная шкала (по умолчанию)

🎉 Copied!

@startgantt
saturday are closed
sunday are closed

Project starts the 1st of january 2021
[Prototype design end] as [TASK1] requires 19 days
[TASK1] is colored in Lavender/LightBlue
[Testing] requires 14 days
[TASK1]->[Testing]

2021-01-18 to 2021-01-22 are named [End's committee]
2021-01-18 to 2021-01-22 are colored in salmon 
@endgantt

Недельная шкала

🎉 Copied!

@startgantt
printscale weekly
saturday are closed
sunday are closed

Project starts the 1st of january 2021
[Prototype design end] as [TASK1] requires 19 days
[TASK1] is colored in Lavender/LightBlue
[Testing] requires 14 days
[TASK1]->[Testing]

2021-01-18 to 2021-01-22 are named [End's committee]
2021-01-18 to 2021-01-22 are colored in salmon 
@endgantt

🎉 Copied!

@startgantt
printscale weekly
Project starts the 20th of september 2020
[Prototype design] as [TASK1] requires 130 days
[TASK1] is colored in Lavender/LightBlue
[Testing] requires  20 days
[TASK1]->[Testing]

2021-01-18 to 2021-01-22 are named [End's committee]
2021-01-18 to 2021-01-22 are colored in salmon 
@endgantt

Месячная шкала

🎉 Copied!

@startgantt
projectscale monthly
Project starts the 20th of september 2020
[Prototype design] as [TASK1] requires 130 days
[TASK1] is colored in Lavender/LightBlue
[Testing] requires 20 days
[TASK1]->[Testing]

2021-01-18 to 2021-01-22 are named [End's committee]
2021-01-18 to 2021-01-22 are colored in salmon 
@endgantt

Квартальная шкала

🎉 Copied!

@startgantt
projectscale quarterly
Project starts the 20th of september 2020
[Prototype design] as [TASK1] requires 130 days
[TASK1] is colored in Lavender/LightBlue
[Testing] requires 20 days
[TASK1]->[Testing]

2021-01-18 to 2021-01-22 are named [End's committee]
2021-01-18 to 2021-01-22 are colored in salmon 
@endgantt

🎉 Copied!

@startgantt
projectscale quarterly
Project starts the 1st of october 2020
[Prototype design] as [TASK1] requires 700 days
[TASK1] is colored in Lavender/LightBlue
[Testing] requires 200 days
[TASK1]->[Testing]

2021-01-18 to 2021-03-22 are colored in salmon 
@endgantt

Годовая шкала

🎉 Copied!

@startgantt
projectscale yearly
Project starts the 1st of october 2020
[Prototype design] as [TASK1] requires 700 days
[TASK1] is colored in Lavender/LightBlue
[Testing] requires 200 days
[TASK1]->[Testing]

2021-01-18 to 2021-03-22 are colored in salmon 
@endgantt

Шкала точного периода командой between

Без точного периода

🎉 Copied!

@startgantt
saturday are closed
sunday are closed

Project starts the 1st of january 2021
[Prototype design end] as [TASK1] requires 8 days
[TASK1] is colored in Lavender/LightBlue
[Testing] requires 3 days
[TASK1]->[Testing]

2021-01-18 to 2021-01-22 are named [End's committee]
2021-01-18 to 2021-01-22 are colored in salmon 
@endgantt

С точным периодом

🎉 Copied!

@startgantt
Print between 2021-01-12 and 2021-01-22
Saturday are closed
sunday are closed

Project starts the 1st of january 2021
[Prototype design end] as [TASK1] requires 8 days
[TASK1] is colored in Lavender/LightBlue
[Testing] requires 3 days
[TASK1]->[Testing]

2021-01-18 to 2021-01-22 are named [End's committee]
2021-01-18 to 2021-01-22 are colored in salmon 
@endgantt

Масштабирование (пример для всех шкал)

С помощью параметра ниже можно изменить масштаб:
  • zoom <integer>

Масштаб на дневной шкале

Без увеличения

🎉 Copied!

@startgantt
printscale daily
saturday are closed
sunday are closed

Project starts the 1st of january 2021
[Prototype design end] as [TASK1] requires 8 days
[TASK1] is colored in Lavender/LightBlue
[Testing] requires  3 days
[TASK1]->[Testing]

2021-01-18 to 2021-01-22 are named [End's committee]
2021-01-18 to 2021-01-22 are colored in salmon 
@endgantt

С увеличением

🎉 Copied!

@startgantt
printscale daily zoom 2
saturday are closed
sunday are closed

Project starts the 1st of january 2021
[Prototype design end] as [TASK1] requires 8 days
[TASK1] is colored in Lavender/LightBlue
[Testing] requires 3 days
[TASK1]->[Testing]

2021-01-18 to 2021-01-22 are named [End's committee]
2021-01-18 to 2021-01-22 are colored in salmon 
@endgantt

[Ref. QA-13725]

Масштаб на недельной шкале

Без увеличения

🎉 Copied!

@startgantt
printscale weekly
saturday are closed
sunday are closed

Project starts the 1st of january 2021
[Prototype design end] as [TASK1] requires 19 days
[TASK1] is colored in Lavender/LightBlue
[Testing] requires 14 days
[TASK1]->[Testing]

2021-01-18 to 2021-01-22 are named [End's committee]
2021-01-18 to 2021-01-22 are colored in salmon 
@endgantt

С увеличением

🎉 Copied!

@startgantt
printscale weekly zoom 4
saturday are closed
sunday are closed

Project starts the 1st of january 2021
[Prototype design end] as [TASK1] requires 19 days
[TASK1] is colored in Lavender/LightBlue
[Testing] requires 14 days
[TASK1]->[Testing]

2021-01-18 to 2021-01-22 are named [End's committee]
2021-01-18 to 2021-01-22 are colored in salmon 
@endgantt

Масштаб на месячной шкале

Без увеличения

🎉 Copied!

@startgantt
projectscale monthly
Project starts the 20th of september 2020
[Prototype design] as [TASK1] requires 130 days
[TASK1] is colored in Lavender/LightBlue
[Testing] requires 20 days
[TASK1]->[Testing]

2021-01-18 to 2021-01-22 are named [End's committee]
2021-01-18 to 2021-01-22 are colored in salmon 
@endgantt

С увеличением

🎉 Copied!

@startgantt
projectscale monthly zoom 3
Project starts the 20th of september 2020
[Prototype design] as [TASK1] requires 130 days
[TASK1] is colored in Lavender/LightBlue
[Testing] requires 20 days
[TASK1]->[Testing]

2021-01-18 to 2021-01-22 are named [End's committee]
2021-01-18 to 2021-01-22 are colored in salmon 
@endgantt

Масштаб на квартальной шкале

Без увеличения

🎉 Copied!

@startgantt
projectscale quarterly
Project starts the 20th of september 2020
[Prototype design] as [TASK1] requires 130 days
[TASK1] is colored in Lavender/LightBlue
[Testing] requires 20 days
[TASK1]->[Testing]

2021-01-18 to 2021-01-22 are named [End's committee]
2021-01-18 to 2021-01-22 are colored in salmon 
@endgantt

С увеличением

🎉 Copied!

@startgantt
projectscale quarterly zoom 7
Project starts the 20th of september 2020
[Prototype design] as [TASK1] requires 130 days
[TASK1] is colored in Lavender/LightBlue
[Testing] requires 20 days
[TASK1]->[Testing]

2021-01-18 to 2021-01-22 are named [End's committee]
2021-01-18 to 2021-01-22 are colored in salmon 
@endgantt

Масштаб на годовой шкале

Без увеличения

🎉 Copied!

@startgantt
projectscale yearly
Project starts the 1st of october 2020
[Prototype design] as [TASK1] requires 700 days
[TASK1] is colored in Lavender/LightBlue
[Testing] requires 200 days
[TASK1]->[Testing]

2021-01-18 to 2021-03-22 are colored in salmon 
@endgantt

С увеличением

🎉 Copied!

@startgantt
projectscale yearly zoom 2
Project starts the 1st of october 2020
[Prototype design] as [TASK1] requires 700 days
[TASK1] is colored in Lavender/LightBlue
[Testing] requires 200 days
[TASK1]->[Testing]

2021-01-18 to 2021-03-22 are colored in salmon 
@endgantt

Недельный масштаб с номерами недель или датами

С указанием номеров недель (настройка по умолчанию)

🎉 Copied!

@startgantt
printscale weekly
Project starts the 6th of July 2020
[Task1] on {Alice} requires 2 weeks
[Task2] on {Bob:50%} requires 2 weeks
then [Task3] on {Alice:25%} requires 3 days
@endgantt

С номерами недель (начиная с 1)

🎉 Copied!

@startgantt
printscale weekly with week numbering from 1
Project starts the 6th of July 2020
[Task1] on {Alice} requires 2 weeks
[Task2] on {Bob:50%} requires 2 weeks
then [Task3] on {Alice:25%} requires 3 days
@endgantt

[См. GH-525]

С указанием дат

🎉 Copied!

@startgantt
printscale weekly with calendar date
Project starts the 6th of July 2020
[Task1] on {Alice} requires 2 weeks
[Task2] on {Bob:50%} requires 2 weeks
then [Task3] on {Alice:25%} requires 3 days
@endgantt

[Ref. QA-11630]

Объявление дней нерабочими (закрытыми)

Можно закрыть любой день.

🎉 Copied!

@startgantt
project starts the 2018/04/09
saturday are closed
sunday are closed
2018/05/01 is closed
2018/04/17 to 2018/04/19 is closed
[Prototype design] requires 14 days
[Test prototype] requires 4 days
[Test prototype] starts at [Prototype design]'s end
[Prototype design] is colored in Fuchsia/FireBrick
[Test prototype] is colored in GreenYellow/Green
@endgantt

Затем можно открыть некоторый закрытый день.

🎉 Copied!

@startgantt
2020-07-07 to 2020-07-17 is closed
2020-07-13 is open

Project starts the 2020-07-01
[Prototype design] requires 10 days
Then [Test prototype] requires 10 days
@endgantt

Зависимость размера недели от количества нерабочих дней в ней

Неделя обозначается ключевым словом week и рассчитывается по количеству рабочих дней в ней. По умолчанию в неделе нет выходных дней, поэтому 1 неделя равняется 7 дням:

🎉 Copied!

@startgantt
language ru
Project starts 2021-03-29
[Ревью1] happens at 2021-03-29
[Ревью2 - 3 недели] happens on 3 weeks after [Ревью1]'s end
[Ревью2 - 21 день] happens on 21 days after [Ревью1]'s end
@endgantt

Если указать при помощи конструкции деньНедели are closed, что суббота и воскресенье будут нерабочими днями, тогда размер 1 недели станет 5 дней:

🎉 Copied!

@startgantt
language ru
Project starts 2021-03-29
saturday are closed
sunday are closed
[Ревью1] happens at 2021-03-29
[Ревью2 - 3 недели] happens on 3 weeks after [Ревью1]'s end
[Ревью2 - 21 день] happens on 21 days after [Ревью1]'s end
@endgantt

[Ref. QA-13434]

Рабочие дни

Вы можете отдельно управлять перечнем рабочих дней.

🎉 Copied!

@startgantt

saturday are closed
sunday are closed
2022-07-04 to 2022-07-15 is closed

Project starts 2022-06-27
[task1] starts at 2022-06-27 and requires 1 week
[task2] starts 2 working days after [task1]'s end and requires 3 days

@endgantt

[Ref. QA-16188]

Упрощенная последовательность задач

Для обозначения последовательных задач можно использовать ключевое слово then.

🎉 Copied!

@startgantt
[Prototype design] requires 14 days
then [Test prototype] requires 4 days
then [Deploy prototype] requires 6 days
@endgantt

Также можно использовать стрелку ->

🎉 Copied!

@startgantt
[Prototype design] requires 14 days
[Build prototype] requires 4 days
[Prepare test] requires 6 days
[Prototype design] -> [Build prototype]
[Prototype design] -> [Prepare test]
@endgantt

Работа с ресурсами

Вы можете воздействовать на задачи, связанные с ресурсами, используя ключевое слово on и скобки для имени ресурса.

🎉 Copied!

@startgantt
[Task1] on {Alice} requires 10 days
[Task2] on {Bob:50%} requires 2 days
then [Task3] on {Alice:25%} requires 1 days
@endgantt

Задаче может быть назначено несколько ресурсов:

🎉 Copied!

@startgantt
[Task1] on {Alice} {Bob} requires 20 days
@endgantt

Ресурсы могут быть помечены как незадействованные в определенные дни:

🎉 Copied!

@startgantt
project starts on 2020-06-19
[Task1] on {Alice} requires 10 days
{Alice} is off on 2020-06-24 to 2020-06-26
@endgantt

Настройки отображения ресурсов

Ресурсы отображены (по умолчанию)

🎉 Copied!

@startgantt
[Task1] on {Alice} requires 10 days
[Task2] on {Bob:50%} requires 2 days
then [Task3] on {Alice:25%} requires 1 days
then [Task4] on {Alice:25%} {Bob} requires 1 days
@endgantt

Имена ресурсов скрыты

Вы можете скрыть имена и процентное соотношение ресурсов в задачах, используя ключевые слова hide ressources names.

🎉 Copied!

@startgantt
hide ressources names
[Task1] on {Alice} requires 10 days
[Task2] on {Bob:50%} requires 2 days
then [Task3] on {Alice:25%} requires 1 days
then [Task4] on {Alice:25%} {Bob} requires 1 days
@endgantt

Скрыт подвал с ресурсами

Вы также можете скрыть названия ресурсов в нижней части диаграммы, используя ключевые слова hide ressources footbox.

🎉 Copied!

@startgantt
hide ressources footbox
[Task1] on {Alice} requires 10 days
[Task2] on {Bob:50%} requires 2 days
then [Task3] on {Alice:25%} requires 1 days
then [Task4] on {Alice:25%} {Bob} requires 1 days
@endgantt

Ресурсы скрыты на задачах и в подвале

Вы можете скрыть имена в обеих частях диаграммы.

🎉 Copied!

@startgantt
hide ressources names
hide ressources footbox
[Task1] on {Alice} requires  10 days
[Task2] on {Bob:50%} requires 2 days
then [Task3] on {Alice:25%} requires 1 days
then [Task4] on {Alice:25%} {Bob} requires 1 days
@endgantt

Горизонтальный разделитель

Вы можете использовать -- для разделения наборов задач.

🎉 Copied!

@startgantt
[Task1] requires 10 days
then [Task2] requires 4 days
-- Phase Two --
then [Task3] requires 5 days
then [Task4] requires 6 days
@endgantt

Вертикальный разделитель

Вы можете добавить вертикальный разделитель при помощи конструкции: Separator just [at].

🎉 Copied!

@startgantt
[task1] requires 1 week
[task2] starts 20 days after [task1]'s end and requires 3 days

Separator just at [task1]'s end
Separator just 2 days after [task1]'s end

Separator just at [task2]'s start
Separator just 2 days before [task2]'s start
@endgantt

[Ref. QA-16247]

Сложный пример

Также можно использовать связку and.

В ограничениях также можно добавлять задержки.

🎉 Copied!

@startgantt
[Разработка прототипа] requires 13 days and is colored in Lavender/LightBlue
[Тестирование прототипа] requires 9 days and is colored in Coral/Green and starts 3 days after [Разработка прототипа]'s end
[Написание тестов] requires 5 days and ends at [Разработка прототипа]'s end
[Найм отв-х за написание тестов] requires 6 days and ends at [Написание тестов]'s start
[Начать и писать отчёт о рез. тестов] is colored in Coral/Green
[Начать и писать отчёт о рез. тестов] starts 1 day before [Тестирование прототипа]'s start and ends at [Тестирование прототипа]'s end
@endgantt

Комментарии

Как указано на [странице "Общие команды"](commons#560kta2oz3a2k362kjbm):
Все, что начинается с <zcode>simple quote '</zcode>, является комментарием.

Вы также можете разместить комментарии на нескольких строках, используя <zcode>/'</zcode> для начала и <zcode>'/</zcode> для конца.
(т.е.: первым символом (кроме пробела) строки комментария должен быть символ simple quote ' )

🎉 Copied!

@startgantt
' This is a comment

[T1] requires 3 days

/' this comment
is on several lines '/

[T2] starts at [T1]'s end and requires 1 day
@endgantt

Использование стилей

Настройки по умолчанию

🎉 Copied!

@startgantt
[Task1] requires 20 days
note bottom
  memo1 ...
  memo2 ...
  explanations1 ...
  explanations2 ...
end note
[Task2] requires 4 days
[Task1] -> [Task2]
-- Separator title --
[M1] happens on 5 days after [Task1]'s end
-- end --
@endgantt

С модулем <style>

Вы можете использовать стиль для изменения отрисовки элементов.

🎉 Copied!

@startgantt
<style>
ganttDiagram {
	task {
		FontName Helvetica
		FontColor red
		FontSize 18
		FontStyle bold
		BackGroundColor GreenYellow
		LineColor blue
	}
	milestone {
		FontColor blue
		FontSize 25
		FontStyle italic
		BackGroundColor yellow
		LineColor red
	}
	note {
		FontColor DarkGreen
		FontSize 10
		LineColor OrangeRed
	}
	arrow {
		FontName Helvetica
		FontColor red
		FontSize 18
		FontStyle bold
		BackGroundColor GreenYellow
		LineColor blue
	}
	separator {
		LineColor red
		BackGroundColor green
		FontSize 16
		FontStyle bold
		FontColor purple
	}
}
</style>
[Task1] requires 20 days
note bottom
  memo1 ...
  memo2 ...
  explanations1 ...
  explanations2 ...
end note
[Task2] requires 4 days
[Task1] -> [Task2]
-- Separator title --
[M1] happens on 5 days after [Task1]'s end
-- end --
@endgantt

[См. QA-10835, QA-12045, QA-11877 и PR-438]

Индивидуальная настройки графических стилей (полный пример)

🎉 Copied!

@startgantt
<style>
ganttDiagram {
	task {
		FontName Helvetica
		FontColor red
		FontSize 18
		FontStyle bold
		BackGroundColor GreenYellow
		LineColor blue
	}
	milestone {
		FontColor blue
		FontSize 25
		FontStyle italic
		BackGroundColor yellow
		LineColor red
	}
	note {
		FontColor DarkGreen
		FontSize 10
		LineColor OrangeRed
	}
	arrow {
		FontName Helvetica
		FontColor red
		FontSize 18
		FontStyle bold
		BackGroundColor GreenYellow
		LineColor blue
		LineStyle 8.0;13.0
		LineThickness 3.0
	}
	separator {
		BackgroundColor lightGreen
		LineStyle 8.0;3.0
		LineColor red
		LineThickness 1.0
		FontSize 16
		FontStyle bold
		FontColor purple
		Margin 5
		Padding 20
	}
	timeline {
	    BackgroundColor Bisque
	}
	closed {
		BackgroundColor pink
		FontColor red
	}
}
</style>
Project starts the 2020-12-01

[Task1] requires 10 days
sunday are closed

note bottom
  memo1 ...
  memo2 ...
  explanations1 ...
  explanations2 ...
end note

[Task2] requires 20 days
[Task2] starts 10 days after [Task1]'s end
-- Separator title --
[M1] happens on 5 days after [Task1]'s end

<style>
	separator {
	    LineColor black
		Margin 0
		Padding 0
	}
</style>

-- end --
@endgantt

[См. QA-13570, QA-13672]

DONE Спасибо за стиль для Separator и все стили для Arrow (толщина...)

Минималистичный стиль диаграммы

С помощью стиля можно также очистить диаграмму Ганта (показывая только задачи, зависимости и относительную длительность - но без фактической даты начала и фактического масштаба):

🎉 Copied!

@startgantt
<style>
ganttDiagram {
  timeline {
    LineColor transparent
    FontColor transparent
 }
}
</style>

hide footbox
[Test prototype] requires 7 days
[Prototype completed] happens at [Test prototype]'s end
[Setup assembly line] requires 9 days
[Setup assembly line] starts at [Test prototype]'s end
then [Setup] requires 5 days
[T2] requires 2 days and starts at [Test prototype]'s end
then [T3] requires 3 days
-- end task --
then [T4] requires 2 days
@endgantt

[См. QA-13971]

Или:

🎉 Copied!

@startgantt
<style>
ganttDiagram {
  timeline {
    LineColor transparent
    FontColor transparent
  }
  closed {
    FontColor transparent
  }
}
</style>

hide footbox
project starts the 2018/04/09
saturday are closed
sunday are closed
2018/05/01 is closed
2018/04/17 to 2018/04/19 is closed
[Prototype design] requires 9 days
[Test prototype] requires 5 days
[Test prototype] starts at [Prototype design]'s end
[Prototype design] is colored in Fuchsia/FireBrick
[Test prototype] is colored in GreenYellow/Green
@endgantt

[См. QA-13464]

Добавление примечания

🎉 Copied!

@startgantt
[task01] requires 15 days
note bottom
  memo1 ...
  memo2 ...
  explanations1 ...
  explanations2 ...
end note

[task01] -> [task02]

@endgantt

Пример с перекрытием.

🎉 Copied!

@startgantt
[task01] requires 15 days
note bottom
  memo1 ...
  memo2 ...
  explanations1 ...
  explanations2 ...
end note

[task01] -> [task02]
[task03] requires 5 days

@endgantt

🎉 Copied!

@startgantt

-- test01 --

[task01] requires 4 days
note bottom
'note left
memo1 ...
memo2 ...
explanations1 ...
explanations2 ...
end note

[task02] requires 8 days
[task01] -> [task02]
note bottom
'note left
memo1 ...
memo2 ...
explanations1 ...
explanations2 ...
end note
-- test02 --

[task03] as [t3] requires 7 days
[t3] -> [t4]
@endgantt

DONE
Спасибо за исправление (из #386 в v1.2020.18) при наложении

🎉 Copied!

@startgantt

Project starts 2020-09-01

[taskA] starts 2020-09-01 and requires 3 days
[taskB] starts 2020-09-10 and requires 3 days
[taskB] displays on same row as [taskA]

[task01] starts 2020-09-05 and requires 4 days

then [task02] requires 8 days
note bottom
  note for task02
  more notes
end note

then [task03] requires 7 days
note bottom
  note for task03
  more notes
end note

-- separator --

[taskC] starts 2020-09-02 and requires 5 days
[taskD] starts 2020-09-09 and requires 5 days
[taskD] displays on same row as [taskC]

[task 10] starts 2020-09-05 and requires 5 days
then [task 11] requires 5 days
note bottom
  note for task11
  more notes
end note
@endgantt

Приостановить выполнение задач

🎉 Copied!

@startgantt
Project starts the 5th of december 2018
saturday are closed
sunday are closed
2018/12/29 is opened
[Prototype design] requires 17 days
[Prototype design] pauses on 2018/12/13
[Prototype design] pauses on 2018/12/14
[Prototype design] pauses on monday
[Test prototype] starts at [Prototype design]'s end and requires 2 weeks
@endgantt

Изменение цвета связей между задачами

Вы можете менять цвета связей:
  • при помощи синтаксиса: with <color> <style> link

🎉 Copied!

@startgantt
[T1] requires 4 days
[T2] requires 4 days and starts 3 days after [T1]'s end with blue dotted link
[T3] requires 4 days and starts 3 days after [T2]'s end with green bold link
[T4] requires 4 days and starts 3 days after [T3]'s end with green dashed link
@endgantt

  • или объявляя цвет в модуле <style>

🎉 Copied!

@startgantt
<style>
ganttDiagram {
	arrow {
		LineColor blue
	}
}
</style>
[Prototype design] requires 7 days
[Build prototype] requires 4 days
[Prepare test] requires 6 days
[Prototype design] -[#FF00FF]-> [Build prototype]
[Prototype design] -[dotted]-> [Prepare test]
Then [Run test]  requires 4 days
@endgantt

[Ref. QA-13693]

Задачи или вехи на одной линии

Задачи или вехи можно разместить на одной линии при помощи следующего синтаксиса:
  • [T|M] displays on same row as [T|M]

🎉 Copied!

@startgantt
[Prototype design] requires 13 days
[Test prototype] requires 4 days and 1 week
[Test prototype] starts 1 week and 2 days after [Prototype design]'s end
[Test prototype] displays on same row as [Prototype design]
[r1] happens on 5 days after [Prototype design]'s end
[r2] happens on 5 days after [r1]'s end
[r3] happens on 5 days after [r2]'s end
[r2] displays on same row as [r1]
[r3] displays on same row as [r1]
@endgantt

Выделение цветом дня "Сегодня"

🎉 Copied!

@startgantt
Project starts the 20th of september 2018
sunday are close
2018/09/21 to 2018/09/23 are colored in salmon
2018/09/21 to 2018/09/30 are named [Vacation in the Bahamas] 

today is 30 days after start and is colored in #AAF
[Foo] happens 40 days after start
[Dummy] requires 10 days and starts 10 days after start

@endgantt

Задачи между двумя вехами

🎉 Copied!

@startgantt
project starts on 2020-07-01
[P_start] happens 2020-07-03
[P_end]   happens 2020-07-13
[Prototype design] occurs from [P_start] to [P_end]
@endgantt

Grammar and verbal form

Verbal form Example
[T] starts
[M] happens

Заголовок, колонтитулы, подписи, легенда

🎉 Copied!

@startgantt

header верхний колонтитул

footer нижний колонтитул

title Моё название

[Разработка прототипа] requires 13 days

legend
Легенда
end legend

caption Это подпись

@endgantt

(See also: Common commands)

Изменение цвета легенды

🎉 Copied!

@startgantt
[Стартовое совещание] requires 1 days and is colored in blue
then [Разработка прототипа] requires 5 days
[Тестирование] requires 4 days
[Тестирование] starts at [Разработка прототипа]'s end
[Разработка прототипа] is colored in Green
[Тестирование] is colored in gray

legend
Легенда:
|= Цвет |= Тип задачи |
|<#gray> | Запланированные |
|<#Green>| В работе |
|<#blue> | Завершённые |
end legend

@endgantt

[Ref. QA-19021]

Отключение подвала диаграммы (пример для всех масштабов)

Чтобы отключить подвал (нижнюю шкалу времени) диаграммы используйте команду hide footbox (справедливо также для диаграммы последовательностей).

Примеры для:

  • Дневной шкалы (без команды начала проекта)

🎉 Copied!

@startgantt

hide footbox
title Удалили подвал

[Prototype design] requires 15 days
[Test prototype] requires 10 days
@endgantt

  • дневной шкалы

🎉 Copied!

@startgantt

Project starts the 20th of september 2017
[Prototype design] as [TASK1] requires 13 days
[TASK1] is colored in Lavender/LightBlue

hide footbox
@endgantt

  • недельной шкалы

🎉 Copied!

@startgantt
hide footbox

printscale weekly
saturday are closed
sunday are closed

Project starts the 1st of january 2021
[Prototype design end] as [TASK1] requires 19 days
[TASK1] is colored in Lavender/LightBlue
[Testing] requires 14 days
[TASK1]->[Testing]

2021-01-18 to 2021-01-22 are named [End's committee]
2021-01-18 to 2021-01-22 are colored in salmon 
@endgantt

  • месячной шкалы

🎉 Copied!

@startgantt

hide footbox

projectscale monthly
Project starts the 20th of september 2020
[Prototype design] as [TASK1] requires 130 days
[TASK1] is colored in Lavender/LightBlue
[Testing] requires 20 days
[TASK1]->[Testing]

2021-01-18 to 2021-01-22 are named [End's committee]
2021-01-18 to 2021-01-22 are colored in salmon 
@endgantt

  • квартальной шкалы

🎉 Copied!

@startgantt

hide footbox

projectscale quarterly
Project starts the 1st of october 2020
[Prototype design] as [TASK1] requires 700 days
[TASK1] is colored in Lavender/LightBlue
[Testing] requires 200 days
[TASK1]->[Testing]

2021-01-18 to 2021-03-22 are colored in salmon 
@endgantt

  • годовой шкалы

🎉 Copied!

@startgantt

hide footbox

projectscale yearly
Project starts the 1st of october 2020
[Prototype design] as [TASK1] requires 700 days
[TASK1] is colored in Lavender/LightBlue
[Testing] requires 200 days
[TASK1]->[Testing]

2021-01-18 to 2021-03-22 are colored in salmon 
@endgantt

Language of the calendar

You can choose the language of the Gantt calendar, with the language <xx> command where <xx> is the ISO 639 code of the language.

English (en, by default)

🎉 Copied!

@startgantt
saturday are closed
sunday are closed

Project starts 2021-01-01
[Prototype design end] as [TASK1] requires 19 days
[TASK1] is colored in Lavender/LightBlue
[Testing] requires 14 days
[TASK1]->[Testing]

2021-01-18 to 2021-01-22 are colored in salmon 
@endgantt

Deutsch (de)

🎉 Copied!

@startgantt
language de
saturday are closed
sunday are closed

Project starts 2021-01-01
[Prototype design end] as [TASK1] requires 19 days
[TASK1] is colored in Lavender/LightBlue
[Testing] requires 14 days
[TASK1]->[Testing]

2021-01-18 to 2021-01-22 are colored in salmon 
@endgantt

Japanese (ja)

🎉 Copied!

@startgantt
language ja
saturday are closed
sunday are closed

Project starts 2021-01-01
[Prototype design end] as [TASK1] requires 19 days
[TASK1] is colored in Lavender/LightBlue
[Testing] requires 14 days
[TASK1]->[Testing]

2021-01-18 to 2021-01-22 are colored in salmon 
@endgantt

Chinese (zh)

🎉 Copied!

@startgantt
language zh
saturday are closed
sunday are closed

Project starts 2021-01-01
[Prototype design end] as [TASK1] requires 19 days
[TASK1] is colored in Lavender/LightBlue
[Testing] requires 14 days
[TASK1]->[Testing]

2021-01-18 to 2021-01-22 are colored in salmon 
@endgantt

Korean (ko)

🎉 Copied!

@startgantt
language ko
saturday are closed
sunday are closed

Project starts 2021-01-01
[Prototype design end] as [TASK1] requires 19 days
[TASK1] is colored in Lavender/LightBlue
[Testing] requires 14 days
[TASK1]->[Testing]

2021-01-18 to 2021-01-22 are colored in salmon 
@endgantt

Удаление задач или вех

Вы можете отметить задачу или веху удалённой при помощи конструкции deleted вместо стандартного обозначения завершёнными для того, чтобы отличать задачи от которых отказались, которые отложили или приняли по ним иное решение.

🎉 Copied!

@startgantt
[Разработка прототипа] requires 1 weeks
then [Прототип готов] requires 4 days
[Завершение готовности] happens at [Прототип готов]'s end
then [Тестирование прототипа] requires 5 days
[Завершение тестирования] happens at [Тестирование прототипа]'s end

[Прототип готов] is deleted
[Завершение готовности] is deleted
@endgantt

[Ref. QA-9129]

Отражение начала проекта, задачи или вехи за несколько дней до или после сегодняшнего дня

Чтобы начать проект, задачу или веху за несколько дней до или после сегодняшнего дня используйте встроенные функции %now и %date:

🎉 Copied!

@startgantt
title Today is %date("YYYY-MM-dd")
!$now = %now()
!$past = %date("YYYY-MM-dd", $now - 14*24*3600)
Project starts $past
today is colored in pink
[foo] requires 10 days
[bar] requires 5 days and starts %date("YYYY-MM-dd", $now + 4*24*3600)
[Tomorrow] happens %date("YYYY-MM-dd", $now + 1*24*3600)
@endgantt

[См. QA-16285]

Изменение расположения ярлыка имени задачи

Ярлык имени расположен рядом с блоком задачи (настройка по умолчанию)

🎉 Copied!

@startgantt
[Task1] requires 1 days
then [Task2_long_long_long] as [T2] requires 2 days
-- Phase Two --
then [Task3] as [T3] requires 2 days
[Task4] as [T4] requires 1 day
[Task5] as [T5] requires 2 days
[T2] -> [T4]
[T2] -> [T5]
[Task6_long_long_long] as [T6] requires 4 days
[T3] -> [T6]
[T5] -> [T6]
[End] happens 1 day after [T6]'s end
@endgantt

Чтобы изменить расположение ярлыка используйте команду label:

Ярлык в первой колонке

  • Выключка влево

🎉 Copied!

@startgantt
Label on first column and left aligned
[Task1] requires 1 days
then [Task2_long_long_long] as [T2] requires 2 days
-- Phase Two --
then [Task3] as [T3] requires 2 days
[Task4] as [T4] requires 1 day
[Task5] as [T5] requires 2 days
[T2] -> [T4]
[T2] -> [T5]
[Task6_long_long_long] as [T6] requires 4 days
[T3] -> [T6]
[T5] -> [T6]
[End] happens 1 day after [T6]'s end
@endgantt

  • Выключка вправо

🎉 Copied!

@startgantt
Label on first column and right aligned
[Task1] requires 1 days
then [Task2_long_long_long] as [T2] requires 2 days
-- Phase Two --
then [Task3] as [T3] requires 2 days
[Task4] as [T4] requires 1 day
[Task5] as [T5] requires 2 days
[T2] -> [T4]
[T2] -> [T5]
[Task6_long_long_long] as [T6] requires 4 days
[T3] -> [T6]
[T5] -> [T6]
[End] happens 1 day after [T6]'s end
@endgantt

Ярлык в последней колонке

  • Выключка влево

🎉 Copied!

@startgantt
Label on last column and left aligned
[Task1] requires 1 days
then [Task2_long_long_long] as [T2] requires 2 days
-- Phase Two --
then [Task3] as [T3] requires 2 days
[Task4] as [T4] requires 1 day
[Task5] as [T5] requires 2 days
[T2] -> [T4]
[T2] -> [T5]
[Task6_long_long_long] as [T6] requires 4 days
[T3] -> [T6]
[T5] -> [T6]
[End] happens 1 day after [T6]'s end
@endgantt

  • Выключка вправо

🎉 Copied!

@startgantt
Label on last column and right aligned
[Task1] requires 1 days
then [Task2_long_long_long] as [T2] requires 2 days
-- Phase Two --
then [Task3] as [T3] requires 2 days
[Task4] as [T4] requires 1 day
[Task5] as [T5] requires 2 days
[T2] -> [T4]
[T2] -> [T5]
[Task6_long_long_long] as [T6] requires 4 days
[T3] -> [T6]
[T5] -> [T6]
[End] happens 1 day after [T6]'s end
@endgantt

[См. QA-12433]


Privacy Policy      Advertise