Our state of the art Gantt chart


Post by caiyuan »

The timing of the tasks data is like this
Image

But the rendered time looks like this
Image

why?


Post by mats »

Try with endDate set to same format as startDate:

endDate : '2019-02-09'

Post by caiyuan »

{
    id: 999,
    name: 'Launch SaaS Product',
    percentDone: 50,
    startDate: '2019-01-24',
    expanded: true,
    children: [
      {
        id: 111111111,
        name: 'Setup web server',
        percentDone: 50,
        duration: 10,
        startDate: '2019-01-28',
        rollup: false,
        endDate: '2019-02-09',
        expanded: true,
      },
      {
        id: 22222,
        name: 'Setup web server2222',
        percentDone: 50,
        duration: 10,
        startDate: '2019-02-28',
        rollup: true,
        endDate: '2019-03-09',
        expanded: true,
      },
      {
        id: 333333,
        name: 'Setup web server3333',
        percentDone: 50,
        duration: 10,
        startDate: '2019-04-28',
        rollup: true,
        endDate: '2019-05-09',
        expanded: true,
      },
    ],
  },

Image

It's not a date format problem, using this code for Gantt chart rendering, the display effect is the effect of this image.

Setup web server3333 The time of this task is obviously different from the time in the code.


Post by Animal »

What if you add

manuallyScheduled: true

to the data block of Setup web server3333?


Post by caiyuan »

It is ok.
I added the code

manuallyScheduled: true

Post by caiyuan »

Still having problems using manual scheduling, that's completely manual between tasks, which isn't what I want either. I just want the tasks not to be automatically scheduled to the start time of the parent task.


Post by arcady »

An automatically scheduled task position is calculated ..even though you provide its start/end dates they are revalidated.

If manual task is not what you want try using constraints:

startDate : "2019-01-28",
constraintType : "startnoearlierthan",
constraintDate : "2019-01-28",

More info on task scheduling principles: https://www.bryntum.com/docs/gantt/guide/engine/gantt_events_scheduling (this chapter describes constraints effect)
Fields docs:
https://www.bryntum.com/docs/gantt/api/Gantt/model/TaskModel#field-constraintType
https://www.bryntum.com/docs/gantt/api/Gantt/model/TaskModel#field-constraintDate


Post Reply