Gantt View Types

Gantt view types define how time-based tasks are arranged and grouped along a timeline. Each view type offers a different way of organising tasks, depending on whether they are flat, categorised, or hierarchical.

All Gantt view types are created via UiBuilder and share a common set of configuration options, such as task definitions, dependencies, and interaction behaviour.

The following Gantt view types are available:

  • GanttView — a standard, flat Gantt layout where each task is rendered on its own row. This view is suitable when tasks do not need to be grouped or nested.

  • CategoryGanttView — groups tasks by a category field, allowing multiple tasks to be displayed on the same category row. This is useful for visualising tasks that belong to logical groups such as teams, resources, or work streams.

  • TreeGridGanttView — displays tasks in a hierarchical tree structure, supporting parent–child relationships between tasks. This view is ideal for project plans with nested tasks or multi-level breakdowns.

class GanttView(table, gantt_task_definition, display_name=None, hidden=False)[source]

Bases: BaseView, FilterableView

Base class for Gantt chart views that visualize time-based task data.

Provides core functionality for configuring Gantt chart behavior including x-axis settings, drag-and-drop interactions, tooltips, navigation, and event handling. This class serves as the foundation for specific Gantt view implementations.

table

The data table containing task information.

gantt_task_definition

Configuration mapping fields to task properties.

chart_title

Optional title displayed on the chart.

on_click_handler_mapping

Maps task keys to click event handlers.

x_axis_min_field

Field ID for the minimum x-axis value.

x_axis_max_field

Field ID for the maximum x-axis value.

with_drag_drop_x

Whether drag-and-drop is enabled on the x-axis.

with_x_axis_header

Whether x-axis headers are displayed.

drag_drop_handle_behaviour

Configuration for drag handle behavior.

snap_x_axis_drag

Snapping interval for drag operations.

x_axis_headers

List of x-axis header configurations.

range_selector_buttons

List of range selector button configurations.

tooltip_properties_mapping

Maps task keys to tooltip property lists.

with_navigator

Whether the navigator is enabled.

tooltip_disabled

Whether tooltips are disabled.

tooltip_boundary

Boundary constraint for tooltip positioning.

__init__(table, gantt_task_definition, display_name=None, hidden=False)[source]

Initialize a GanttView instance.

Parameters:
  • table (Table) – The data table containing task records.

  • gantt_task_definition (GanttTaskDefinition) – Configuration defining how fields map to task properties.

  • display_name (str | None) – Optional name displayed for this view in the UI.

  • hidden (bool) – Whether the view should be hidden by default.

set_use_filter(use_filter)[source]

Attaches a filter component to this Gantt view.

Return type:

GanttView

set_x_axis_behaviour(min_field, max_field)[source]

Configure the x-axis range boundaries using field values.

Validates that the provided fields have supported data types before assigning them as the minimum and maximum x-axis limits.

Parameters:
  • min_field (Parameter | Calculation | None) – Field representing the minimum x-axis value (start of range).

  • max_field (Parameter | Calculation | None) – Field representing the maximum x-axis value (end of range).

Raises:

ValueError – If a provided field has an unsupported data type.

Return type:

GanttView

set_drag_drop_behaviour(drag_drop_snap_interval, drag_drop_handle_behaviour)[source]

Configure drag-and-drop behavior for Gantt chart tasks.

Sets the snapping interval and handle behavior for dragging tasks. Automatically enables drag-and-drop functionality if either parameter is provided.

Parameters:
  • drag_drop_snap_interval (DragDropSnapInterval | None) – The interval to which dragged positions snap (e.g., MINUTE, HOUR, DAY).

  • drag_drop_handle_behaviour (DragDropHandleBehaviour | None) – Defines which handles are available for dragging (e.g., START_AND_END, START_ONLY, END_ONLY, NONE).

Return type:

GanttView

add_on_click_handler_mapping(key, event)[source]

Register a click event handler for a specific task key.

Parameters:
  • key (str) – The unique identifier for the task.

  • event (ModelEvent) – The ModelEvent to trigger when the task is clicked.

add_x_axis_header(x_axis_header)[source]

Adds a unique x-axis header and set with_x_axis_header to True. Duplicate headers are ignored.

Return type:

None

set_standard_x_axis_header()[source]

Sets the X-axis header to the standard set.

Return type:

None

set_standard_24_x_axis_header()[source]

Sets the X-axis header to the standard 24hr time set.

Return type:

None

set_calendar_week_x_axis_header()[source]

Sets the X-axis header to the calendar week set.

Return type:

None

set_calendar_week_24_x_axis_header()[source]

Sets the X-axis header to the calendar week set with 24hr time.

Return type:

None

add_range_selector_buttons(button_type, count, text)[source]

Add a range selector button to the Gantt chart controls.

Range selector buttons allow users to quickly change the visible time range (e.g., “Last 7 Days”, “This Month”, “Next Quarter”).

Parameters:
  • button_type (RangeSelectorButtonType) – The type of time range for the button (e.g., DAY, WEEK, MONTH).

  • count (int) – The number of time units to include in the range.

  • text (str) – A custom label text for the button.

add_tooltip_properties_mapping(key, property_list)[source]

Configure tooltip properties for a specific task key.

Defines which properties should be displayed in the tooltip when hovering over or interacting with a task.

Parameters:
  • key (str) – The unique identifier for the task.

  • property_list (list[TooltipProperty]) – List of TooltipProperty objects defining what information to display in the tooltip (e.g., start date, end date, custom fields).

class CategoryGanttView(table, gantt_task_definition, display_name=None, hidden=False)[source]

Bases: GanttView

A Gantt view that organizes tasks into categories along the y-axis.

Extends the base GanttView to support categorical organization of tasks, where the y-axis represents different categories (e.g., resources, teams, or departments) rather than a hierarchical tree structure. Tasks can be grouped and displayed in rows corresponding to their category.

y_axis_source

Table ID containing the category definitions.

y_axis_display_field

Field ID for the category display name.

y_axis_reference_field

Field ID linking tasks to their category.

with_drag_drop_y

Whether tasks can be dragged between categories.

__init__(table, gantt_task_definition, display_name=None, hidden=False)[source]

Initialize a CategoryGanttView instance.

Parameters:
  • table (Table) – The data table containing task records.

  • gantt_task_definition (CategoryGanttTaskDefinition) – Configuration defining how fields map to task properties.

  • display_name (str | None) – Optional name displayed for this view in the UI.

  • hidden (bool) – Whether the view should be hidden by default.

set_use_filter(use_filter)[source]

Attaches a filter component to this Gantt view.

Return type:

CategoryGanttView

set_y_axis(y_axis_source, y_axis_display_field=None, y_axis_reference_field=None)[source]

Configures the y-axis category source and display fields.

Parameters:
  • y_axis_source (Table) – The table containing category definitions for the y-axis.

  • y_axis_display_field (Field | None) – The field in y_axis_source to display as category labels.

  • y_axis_reference_field (Field | None) – The field linking tasks to their category in y_axis_source.

Raises:

ValueError – If y_axis_display_field is not a field in the y_axis_source table.

Return type:

CategoryGanttView

set_with_drag_drop_y(with_drag_drop_y)[source]

Sets whether tasks can be dragged between categories on the y-axis.

Return type:

CategoryGanttView

class TreeGridGanttView(table, gantt_task_definition, display_name=None, hidden=False, use_filter=None)[source]

Bases: GanttView

A specialized Gantt view that combines a tree grid with Gantt chart visualization.

Extends the base GanttView to provide a hierarchical tree structure alongside the timeline visualization, allowing users to see task relationships and dependencies in a tree format while viewing their schedules.

__init__(table, gantt_task_definition, display_name=None, hidden=False, use_filter=None)[source]

Initialize a TreeGridGanttView instance.

Parameters:
  • table (Table) – The data table containing task records.

  • gantt_task_definition (TreeGridGanttTaskDefinition) – TreeGridGanttTaskDefinition with tree-grid specific configuration.

  • display_name (str | None) – Optional name displayed for this view in the UI.

  • hidden (bool) – Whether the view should be hidden by default.

  • use_filter (FilterComponent | None) – The identifier (filter name) of a ViewFilterDef to apply when querying data for this view.