Example of Resource Allocation in Blazor Gantt Chart Component
This sample demonstrates the options to allocate one or more resources to a task based on the task requirement such as work needed. The Work is the total labor hours necessary to complete a task.
ID | Event Name | Event Resources | Work (Hours) | Duration | Task Type | Start Date | End Date |
---|
1 | Project initiation | 128 Hours | 4 days | FixedDuration | 3/29/2021 | 4/1/2021 | |
2 | Identify site location | Martin Tamer [71.43%], Van Jack [50%] | 16 Hours | 2 days | FixedDuration | 3/29/2021 | 3/30/2021 |
3 | Perform soil test | Rose Fuller, Margaret Buchanan, Van Jack | 96 Hours | 4 days | FixedWork | 3/29/2021 | 4/1/2021 |
4 | Soil test approval | Jack Davolio, Tamer Vinet | 16 Hours | 1 day | FixedWork | 3/29/2021 | 3/29/2021 |
5 | Project estimation | 138 Hours | 6 days | FixedDuration | 3/29/2021 | 4/5/2021 | |
6 | Develop floor plan for estimation | Fuller King [125%] | 30 Hours | 3 days | FixedWork | 3/29/2021 | 3/31/2021 |
7 | List materials | Fuller King, Jack Davolio | 48 Hours | 3 days | FixedWork | 4/1/2021 | 4/5/2021 |
8 | Estimation approval | Construction Supervisor [187.5%], Davolio Fuller [187.5%] | 60 Hours | 2 days | FixedWork | 4/1/2021 | 4/2/2021 |
9 | Sign contract | Construction Supervisor [150%], Davolio Fuller [150%] | 24 Hours | 1 day | FixedWork | 3/31/2021 | 3/31/2021 |
Mar 28, 2021 | Apr 04, 2021 | Apr 11, 2021 | Apr 18, 2021 | Apr 25, 2021 | May 02, 2021 | May 09, 2021 | May 16, 2021 | May 23, 2021 | May 30, 2021 | Jun 06, 2021 | Jun 13, 2021 | Jun 20, 2021 | Jun 27, 2021 | Jul 04, 2021 | Jul 11, 2021 | Jul 18, 2021 | Jul 25, 2021 |
S | M | T | W | T | F | S | S | M | T | W | T | F | S | S | M | T | W | T | F | S | S | M | T | W | T | F | S | S | M | T | W | T | F | S | S | M | T | W | T | F | S | S | M | T | W | T | F | S | S | M | T | W | T | F | S | S | M | T | W | T | F | S | S | M | T | W | T | F | S | S | M | T | W | T | F | S | S | M | T | W | T | F | S | S | M | T | W | T | F | S | S | M | T | W | T | F | S | S | M | T | W | T | F | S | S | M | T | W | T | F | S | S | M | T | W | T | F | S | S | M | T |
In this example, you can see how to allocate single or multiple resources for a task by editing. Based on the task complexity and resource availability, you can plan and allocate resources to tasks in the project. In this demo, a set of predefined resources is used, and their IDs are assigned to the resource assignment collection. Resource information can be displayed in the Gantt chart using the LabelSettings property.
Resources can be mapped using the GanttResource component with the following properties:
Id
- To map resource ID.Name
- To map resource name.MaxUnits
- To map resource units.DataSource
- To map resource data source.
Resource assignments between tasks can be mapped using the GanttAssignmentFields component with the following properties:
PrimaryKey
- To map the primary key.TaskID
- To map the task ID.ResourceID
- To map the resource ID.DataSource
- To map the resource assignment data source.
The work, duration, and resource unit fields of a task depend on each other, and will change automatically when any one of these fields is edited. However, the field values can also be set as constant using the TaskType property of GanttTaskFields
. The following values can be set for the type property:
FixedDuration
- The duration task field will remain constant while updating resource units or the work field.FixedWork
- The work field will remain constant while updating resource units or duration fields.FixedUnit
- Resource units will remain constant while updating duration or work fields.
The Work can be mapped from the data source field using the Work
property of GanttTaskFields. When the Work value is mapped from the data source, the end date and duration of the task will be calculated automatically based on the work and resource unit values from the data source. Work can be measured in hours, days, and minutes, with hours being the default scale. This can be changed using the WorkUnit property.
More information about resources in Gantt can be found in this documentation section.