We have been struggling with the dependencyStore and did not succeed to set the dependencies.
Could you tell us what's is wrong or is there any issue, because when the code (see below = gantt.dependencyStore.data ) is in place then we are facing an issue (look at the screenshot)
// Add TaskEvent
gantt.taskStore.data = {
id : 1,
name : 'Write docs',
startDate : '2017-01-02',
endDate : '2017-01-10',
expanded : true,
children : [
{ id : 2, name : 'Proof-read docs', startDate : '2017-01-02', endDate : '2017-01-06' },
{ id : 3, name : 'Release docs', startDate : '2017-01-06', endDate : '2017-01-10' }
]
};
// Add Dependencies
gantt.dependencyStore.data = { fromEvent : 2, toEvent : 3 };
After a little while, we succeed to add dependencies like this :
// Add TaskEvent
gantt.taskStore.data = {
id : 1,
name : 'Write docs',
startDate : '2017-01-02',
endDate : '2017-01-10',
expanded : true,
children : [
{ id : 2, name : 'Proof-read docs', startDate : '2017-01-02', endDate : '2017-01-06' },
{ id : 3, name : 'Release docs', startDate : '2017-01-06', endDate : '2017-01-10' }
]
};
// Add Dependencies
gantt.dependencyStore.add({ fromEvent : 2, toEvent : 3 });
As a matter of fact it seems that using "data" as property does not work.
But using "add" function gives us what expected, to wit : adding dependencies.
Could you tell us what's wrong with "gantt.dependencyStore.data = { fromEvent : 2, toEvent : 3 };"
whilst using the function is ok "gantt.dependencyStore.add({ fromEvent : 2, toEvent : 3 });"
Thank you