Below are the list of public APIs available in Gantt PowerApps code component.
Defines the data source for the Gantt code component. It specifies the datasources
that the Gantt retrieves its data.
Note
The dataSource
defines in self-referential data, also known as hierarchical or tree-structured data, you typically need a structure where each item can reference itself through a parent-child relationship. Checkout the Gantt documentation for more details on the self-refrential data.
If enableDarkMode
set to true, then it will enable the dark mode for the Gantt code component.
The configuration settings for the Gantt code component in JSON format. It specifies the ganttConfig
of the Gantt. The following properties are available in the ganttConfig
object.
taskFields
: Defines mapping properties to find task values such as id, start date, end date, duration and progress values from data source.columns
: Defines column collection displayed in grid If thecolumns
declaration was empty then columns are automatically populated from taskSettings value.resources
: Defines resource collection assigned for projects.resourceFields
: Defines mapping properties to find resource values such as id, name, unit and group from resource collection.dayWorkingTime
: Defines customized working time of project.eventMarkers
: Defines events and status of project throughout the timeline.filterSettings
: Allows you to configures the filter settings for Gantt.holidays
: Defines holidays presented in project timeline.searchSettings
: Allows you to configures the search settings for Gantt.selectionSettings
: Allows you to configures the selection settings for Gantt.sortSettings
: Allows you to configures the sort settings for Gantt.splitterSettings
: Allows you to configures the splitter settings for Gantt.timelineSettings
: Allows you to configures the timeline settings for Gantt.
Note
The taskFields
property is mandatory in ganttConfig
property. because without taskFields
property Gantt Chart component not render. If you want to customize the Gantt code component, you can use this property to set the configuration settings. Use the JSON format to set the configuration. Checkout the Gantt documentation for more details on the configuration settings.
Defaults to ""
If allowFiltering
set to true, then it enables filtering support in Gantt.
Defaults to false
If allowReordering
set to true, Gantt columns can be reordered. Reordering can be done by drag and drop of a particular column from one index to another index.
Defaults to false
If allowResizing
set to true, then the Gantt columns can be resized.
Defaults to false
If allowSelection
set to true, it allows selection of (highlight row) Gantt chart rows by clicking it.
Defaults to true
If allowSorting
set to true, it allows sorting of gantt chart tasks when column header is clicked.
Defaults to false
If enableCriticalPath
set to true, It highlights the critical tasks in the Gantt Chart that affect the project’s end date.
Defaults to false
If showColumnMenu
set to true, then it will enable the column menu options in each columns.
Defaults to false
If ShowToolbar
set to true, then its show the toolbar UI that holds built-in toolbar options to accessing frequently used features like ExpandAll, CollapseAll, PrevTimeSpan, NextTimeSpan, ZoomIn, ZoomOut, ZoomToFit, etc….
Defaults to false
It Configures the grid lines in tree grid and gantt chart. The available types are,
- Horizontal - Define horizontal lines.
- Vertical - Define vertical lines.
- Both - Define both horizontal and vertical lines.
- None - Define no lines.
Defaults to Horizontal
By default, task schedule dates are calculated with system time zone. If Gantt chart assigned with specific time zone, then schedule dates are calculated as given time zone date value.
Defines the expander column index in Grid.
Defaults to 0
Defines the view type of the Gantt. The available types are,
- ProjectView - Defines the project view type of the Gantt.
- ResourceView - Defines the resource view type of the Gantt.
Defaults to ProjectView
Defines the event name for the Gantt code component. It specifies the event
of the Gantt. Possible values are onError
.
Outputs error message when onError is triggered. Use below PowerFx code in the onChange property to notify the error message in the canvas application.
If(
Self.EventName="onError",
Notify(Self.OnError, NotificationType.Error)
)