JavaScript/jQuery Gantt - tasks
Type:
Default Value: null
Use the dataSource option to bind the widget to a data source, which contains tasks. If the field names in your data source differ from default names ('id', 'parentId', 'title', 'start', 'end', 'progress'), use appropriate options (keyExpr, parentIdExpr, etc.) to map data fields.
See Also
index.js
data.js
- $(function() {
- $("#gantt").dxGantt({
- tasks: {
- dataSource: tasks,
- keyExpr: "taskId",
- parentIdExpr: "parentTaskId",
- titleExpr: "taskTitle",
- progressExpr: "taskProgress",
- startExpr: "startDate",
- endExpr: "endDate"
- },
- //...
- });
- });
- var tasks = [{
- 'taskId': 1,
- 'parentTaskId': 0,
- 'taskTitle': 'Software Development',
- 'startDate': new Date('2019-02-21T05:00:00.000Z'),
- 'endDate': new Date('2019-07-04T12:00:00.000Z'),
- 'taskProgress': 31
- },
- // ...
- ];
dataSource
Default Value: null
Refer to the tasks option to see how to specify the dataSource option.
Feel free to share topic-related thoughts here.
If you have technical questions, please create a support ticket in the DevExpress Support Center.
Thank you for the feedback!
If you have technical questions, please create a support ticket in the DevExpress Support Center.