React Gantt - resourceAssignments
Resource assignments define relationship between tasks and resources.
Use the dataSource option to bind the widget 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 options to map data fields.
See Also
- import React from 'react';
- import 'devextreme/dist/css/dx.common.css';
- import 'devextreme/dist/css/dx.light.css';
- import Gantt, {
- ResourceAssignments,
- //...
- } from 'devextreme-react/gantt';
- import {
- resourceAssignments,
- //...
- } from './data.js';
- class App extends React.Component {
- render() {
- return (
- <Gantt ... >
- <ResourceAssignments
- dataSource={resourceAssignments}
- keyExpr="key"
- resourceIdExpr="resourceKey"
- taskIdExpr="taskKey" />
- </Gantt>
- );
- }
- }
- export default App;
- export const resourceAssignments = [{
- 'key': 0,
- 'taskKey': 3,
- 'resourceKey': 1
- },
- // ...
- ];
dataSource
Refer to the resourceAssignments option to see how to specify the dataSource option.
resourceIdExpr
Refer to the resourceAssignments option to see how to specify the resourceIdExpr option.
If you have technical questions, please create a support ticket in the DevExpress Support Center.