how to draw links in Gantt chart.

Hi There,

I’m using Gantt chart API for personal use.
I’m almost done with
var demo_tasks = {
“data”:[
{“id”:11, “text”:“PRF #1”, “start_date”:“1-08-2014”, “duration”:“11”, “progress”: 0.6, “open”: true}]
}
part but unable to draw
“links”:[
{“id”:“1”,“source”:“1”,“target”:“2”,“type”:“1”},]

do we have any function available to draw these links on the page it self?

Please guide me…
hoping your favour…

Make sure your gantt have items with ids ‘1’ and ‘2’ which you use for ‘source’ and ‘target’.

If ids are correct, link can be added from the data source or via API. For the data examples you may check the samples folder of the gantt package (here is an online example docs.dhtmlx.com/gantt/samples/common/testdata.js )

As for api method, you may try run following code from the browser console, on the example page:
docs.dhtmlx.com/gantt/samples/01 … _json.html gantt.addLink({ "type" : gantt.config.links.start_to_start, "source": 1, "target":8})
docs.dhtmlx.com/gantt/api__gantt_addlink.html