Here's a simple Gantt:
import {Gantt, ProjectModel} from './gantt.module.js';
const project = new ProjectModel({
autoSync: true,
transport : {
load : {
url : 'data2.json'
},
sync : {
url : 'sync',
}
}
});
new Gantt({
adopt : document.body,
project : project,
columns : [
{ type : 'name', field : 'name', width : 250 }
],
});
project.load();
{
"success": true,
"tasks": {
"rows": [{
"id": 2,
"name": "AC8001 - Cavendish inc. - Fries depot",
"children": [{
"id": 3,
"name": "Production",
"duration": null
}]
}, {
"id": 38,
"name": "New task 1",
"startDate": "2020-03-31 04:00:00",
"endDate": "2020-04-13 04:00:00",
"parentIndex": 3
}]
},
"resources": {
"rows": [
{"id": 1, "name": "Doris"},
{"id": 2, "name": "Stephen"}
]
}
}
Here's what I get:
{
"type": "sync",
"requestId": "15863626625212",
"tasks": {
"updated": [{
"effort": 13,
"id": 38
}]
},
"assignments": {
"updated": [{
"event": 38,
"resource": 1,
"id": "_generated_0x15cf271"
}]
}
}
Using Gantt v2.1.0