Page 2 of 2

Re: Chrono Graph

Posted: Mon Dec 14, 2020 10:58 am
by nickolay

Thats a bug - all the code, that is used by engine should be isomorphic. Please post which lines you had to comment.


Re: Chrono Graph

Posted: Mon Dec 14, 2020 11:09 am
by rahulranjan

HI Line Commented

In BroweserHelper.js

   const params = new URL(window.location.href).searchParams;
        return Object.fromEntries(params.entries());

In AjaxHelper.js

 resourceRoot     = BrowserHelper.queryString.__resourceRoot  || '',

In LocaleManager.js

//     scriptTag = document.querySelector('script[data-default-locale]');
        // if (scriptTag) {
        //     me.defaultLocaleName = scriptTag.dataset.defaultLocale;
        // }

The Above lines are commented to run the code


Re: Chrono Graph

Posted: Mon Dec 14, 2020 12:00 pm
by nickolay

Ok, thanks, we'll sort these out in the next release.


Re: Chrono Graph

Posted: Thu Dec 17, 2020 10:39 am
by rahulranjan

HI We need to pass ResourceAssignment , Calendars , Resources and Dependences Data but it seems it not working correctly.

import { GanttProjectMixin } from "./lib/Engine/quark/model/gantt/GanttProjectMixin.js";
const project = new GanttProjectMixin({
  startDate: new Date(2020, 0, 1),
  eventsData: [
    {
      id: "e1",
      name: "Event1",
      startDate: new Date(2020, 2, 1),
      duration: 15,
      manuallyScheduled: true
    },
    {
      id: "e2",
      name: "Event2",
      startDate: new Date(2020, 10, 10),
      duration: 10,
      manuallyScheduled: false
    }
  ],
  dependencyStore: [
    {
      fromTask: "e1",
      toTask: "e2",
      type: 2,
      id: 1
    }
  ]
});

await project.commitAsync();
const event1 = project.getEventById("e1");



Do we need to Import SchedulerPro ?


Re: Chrono Graph

Posted: Thu Dec 17, 2020 11:43 am
by mats

"but it seems it not working correctly."

Please share a few words how "it's not working"


Re: Chrono Graph

Posted: Thu Dec 17, 2020 12:13 pm
by rahulranjan

When i pass the dependency store the relationships does not take into account and dates are not shifted


Re: Chrono Graph

Posted: Thu Dec 17, 2020 12:15 pm
by nickolay

The dependency in engine uses "fromEvent" and "toEvent" fields instead of "fromTask", "toTask".

See: https://bryntum.com/docs/gantt/engine/classes/_lib_engine_quark_model_scheduler_basic_basedependencymixin_.basedependencymixin.html


Re: Chrono Graph

Posted: Thu Dec 17, 2020 12:30 pm
by rahulranjan

Hi

import { GanttProjectMixin } from "./lib/Engine/quark/model/gantt/GanttProjectMixin.js";
const project = new GanttProjectMixin({
  startDate: new Date(2020, 0, 1),
  eventsData: [
    {
      id: "e1",
      name: "Event1",
      startDate: new Date(2020, 2, 1),
      duration: 15,
      manuallyScheduled: false
    },
    {
      id: "e2",
      name: "Event2",
      startDate: new Date(2020, 10, 10),
      duration: 10,
      manuallyScheduled: false
    }
  ],
  dependencyStore: [
    {
      fromEvent: "e1",
      toEvent: "e2",
      type: 2,
      id: 1
    }
  ]
});

await project.commitAsync();
const event1 = project.getEventById("e1");
console.log("Start Date is :" + event1.startDate);
const event2 = project.getEventById("e2");
console.log("E2 Start: " + event2.startDate);

Done with it but still dates don't shift of e2 as it is end to start so after ending e1 then e2 should start and start date of e2 should be starting after e1 ends


Re: Chrono Graph

Posted: Thu Dec 17, 2020 12:34 pm
by nickolay

dependencyStore => dependencyData