Angular Gantt - resourceAssignments

Configures resource assignments.

Selector: dxo-resource-assignments
Type:

Object

Default Value: null

View Demo

Resource assignments define relationship between tasks and resources.

Use the dataSource property to bind the UI component to a data source, which contains resource assignments. If the field names in your data source differ from the 'id', 'resourceId' and 'taskId' default names, use the keyExpr, resourceIdExpr and/or taskIdExpr properties to map data fields.

See Also
App.vue
data.js
  • <template>
  • <DxGantt ... >
  • <DxResourceAssignments
  • :data-source="resourceAssignments"
  • key-expr="key"
  • resource-id-expr="resourceKey"
  • task-id-expr="taskKey" />
  • <!-- ... -->
  • </DxGantt>
  • </template>
  • <script>
  • import 'devextreme/dist/css/dx.light.css';
  • import 'devexpress-gantt/dist/dx-gantt.css';
  •  
  • import {
  • DxGantt,
  • DxResourceAssignments,
  • //...
  • } from 'devextreme-vue/gantt';
  • import {
  • resourceAssignments,
  • // ...
  • } from './data.js';
  •  
  • export default {
  • components: {
  • DxGantt,
  • DxResourceAssignments,
  • //...
  • },
  • data() {
  • return {
  • resourceAssignments,
  • //...
  • };
  • }
  • };
  • </script>
  • export const resourceAssignments = [{
  • 'key': 0,
  • 'taskKey': 3,
  • 'resourceKey': 1
  • },
  • // ...
  • ];

dataSource

Binds the UI component to the data source, which contains resource assignments.

Default Value: null

Refer to the resourceAssignments property to see how to specify the dataSource property.

keyExpr

Specifies the data field that provides keys for resource assignments.

Type:

String

|

Function

Default Value: 'id'

Refer to the resourceAssignments property to see how to specify the keyExpr property.

resourceIdExpr

Specifies the data field that provides resource IDs.

Type:

String

|

Function

Default Value: 'resourceId'

Refer to the resourceAssignments property to see how to specify the resourceIdExpr property.

taskIdExpr

Specifies the data field that provides task IDs.

Type:

String

|

Function

Default Value: 'taskId'

Refer to the resourceAssignments property to see how to specify the taskIdExpr property.