Our state of the art Gantt chart


Post by NARESH.RAI »

Hi,

In current examples all data is loaded from json file from transporter.
I want to pass resources from other object instead of json file.

1) How could i pass resources to my gantt project ?
2) how could we load ptoject json data from variables instead of using transporter as json file?


Post by fabio.mazza »

Hi Naresh. You can add tasks using https://www.bryntum.com/docs/gantt/#Gantt/data/TaskStore#function-add and resources using https://www.bryntum.com/docs/gantt/#Gantt/data/ResourceStore#function-add directly to your store, examples:

gantt.taskStore.add(yourTask(s));
gantt.resourceStore.add(yourResource(s));

Best regards,
Fabio


Post by NARESH.RAI »

Thanks!

But my 2nd question that how could i load or sync data without using below model?
Is there any other way so i can save my data manually using angular api ?

  transport: {
        load: {
          url: "./assets/datasets/sampleData.json",
        },
        sync: {
          url: "abc.php",
        },
      },

Post by alex.l »

Hi NARESH.RAI,

You can set/get data directly to any store using https://bryntum.com/docs/gantt/#Scheduler/data/EventStore#config-data

All best,
Alex

All the best,
Alex


Post Reply