parse

loads data from a client-side resource

void parse(string|object url, [string type] );

Parameters

urlstring|objecta string or object which represents data
typestringoptional, ('json', 'xml') the data type. The default value - 'json'

Example

gantt.parse({
    data:[
        {id:1, text:"Project #2", start_date:"01-04-2013", duration:18},
        {id:2, text:"Task #1",    start_date:"02-04-2013", duration:8,
            progress:0.6, parent:1},
        {id:3, text:"Task #2",    start_date:"11-04-2013", duration:8,
            progress:0.6, parent:1}
    ],
    links:[
        { id:1, source:1, target:2, type:1},
        { id:2, source:2, target:3, type:0}
  ]
});

Related samples

See also
Back to top