GanttChart ========== .. php:class:: GanttChart Represents a Gantt chart .. php:method:: addItem(Milestone|Section|Task|VerticalMarker ...$item) Add item(s) to the GanttChart :param Milestone|Section|Task|VerticalMarker $item: The item(s) :returns: A new ``GanttChart`` instance with the item(s) added :rtype: GanttChart .. php:method:: render(array $attributes = []) Renders the diagram :param array $attributes: HTML attributes for the
tag as name=>value pairs
.. note:: The *mermaid* class is added
:returns: Mermaid diagram code in a tag
:rtype: string
.. php:method:: withComment(string $comment)
Set a comment for the chart
:param string $comment: The comment
:returns: A new ``GanttChart`` instance with the comment
:rtype: GanttChart
.. php:method:: withItem(Milestone|Section|Task|VerticalMarker ...$item)
Set GanttChart item(s)
:param Milestone|Section|Task|VerticalMarker $item: The item(s)
:returns: A new ``GanttChart`` instance with the item(s)
:rtype: GanttChart
.. php:method:: withAxisFormat(string $axisFormat)
Set the axis date format
See `Output date format on the axis `__
:param Milestone|Section|Task $item: The item(s)
:returns: A new ``GanttChart`` instance with the item(s)
:rtype: GanttChart
.. php:method:: withDateFormat(string $dateFormat)
Set the chart input date format
See `Input date format `__
:param string $dateFormat: The date format
:returns: A new ``GanttChart`` instance with the date format
:rtype: GanttChart
.. php:method:: withExcludes(string|Exclude ...$excludes)
Set day(s) that are excluded from task duration calculations
:param string|Exclude ...$excludes: Day(s) that are excluded from task duration calculations
as either a date in the the date format (:php:meth:`withDateFormat`) or an :php:enum:`Exclude` enum
:returns: A new ``GanttChart`` instance with the excluded date(s)
:rtype: GanttChart
.. php:method:: withStartOfWeek(Weekday $weekday)
Sets the start of the week
Tick markers are placed on the start of the week
:param Weekday $weekday: The item(s)
:returns: A new ``GanttChart`` instance with the item(s)
:rtype: GanttChart
.. php:method:: withTickInterval(string $tickInterval)
Sets the chart tick interval
:param string $tickInterval: The tick interval as a period in the form *nt* where *n* is an integer and *t* is a period, e.g. *week*
:returns: A new ``GanttChart`` instance with the tick interval
:rtype: GanttChart
.. php:method:: withTitle(string $title)
Set a title for the chart
:param string $title: The title
:returns: A new ``GanttChart`` instance with the title
:rtype: GanttChart
.. php:method:: withTodayMarker(string $todayMarker)
Set the style for the today marker
:param string $title: The today marker style. Use ``off`` to hide the today marker
:returns: A new ``GanttChart`` instance with the today marker styled
:rtype: GanttChart
.. php:method:: withWeekend(Weekend $weekend)
Set the first day of the weekend
Weekends are two days long
:param Weekend $weekend: The first day of the weekend
:returns: A new ``GanttChart`` instance with the first day of the weekend
:rtype: GanttChart