Our state of the art Gantt chart


Post by spodeopieter2 »

Good day ,
I am struggling to get data to load correctly. I am using the pdf-export reat demo. I have modified the launch-saas.json like this
 "tasks": {
    "rows": [
      {
        "id": 1000,
        "name": "ABC",
        "expanded": true,
        "children": [
          {
            "id": 1,
            "name": "Section",
            "rollup": true,
            "expanded": true,
            "children": [
              {
                "name": "123",
                "rollup": true,
                "percentDone": 100,

                "startDate": "2011-01-11",
                "endDate": "2011-01-11"
              },
              {
                "name": "1234",
                "rollup": true,
                "percentDone": 100,

                "startDate": "2011-01-11",
                "endDate": "2011-01-12"
              },
              {
                "name": "12345",
                "rollup": true,
                "percentDone": 100,

                "startDate": "2011-01-12",
                "endDate": "2011-01-15"
              }
            ]
          }
        ]
      }
    ]
  },

  "dependencies": {
    "rows": []
  },
and I have modified Main.js like this:
      <BryntumGantt
        ref={gantt}
        project={project}
        pdfExportFeature={{
          exportServer: "https://localhost:8080",
          // Development config
          translateURLsToAbsolute: "https://localhost:3000",
          clientURL: "https://localhost:3000",
          // For production replace with this one. See README.md for explanation
          // translateURLsToAbsolute : 'https://localhost:8080/resources/', // Trailing slash is important

          keepPathName: false,
        }}
        viewPreset="weekAndDayLetter"
        barMargin={10}
        rollupsFeature={true}
      />
and I am getting the following :
StartDateIssue.PNG
StartDateIssue.PNG (23.7 KiB) Viewed 2362 times
Why is the task 12345 not starting one day after task 1234 ?

Post by saki »

Because your dependencies are empty. Dependencies determine relations between tasks.

Post by spodeopieter2 »

In reality my tasks are not dependent on each other , is there another way to have them stand alone on a specific date ? or is my only option to add "fake" dependencies ?

Post by saki »

I see. I have tested the following in React PDF Export demo:

Data:
{
  "success": true,
  "tasks": {
    "rows": [
      {
        "id": 1000,
        "name": "ABC",
        "expanded": true,
        "children": [
          {
            "id": 1,
            "name": "Section",
            "rollup": true,
            "expanded": true,
            "children": [
              {
                "name": "123",
                "rollup": true,
                "percentDone": 100,
                
                "startDate": "2011-01-11",
                "endDate": "2011-01-11"
              },
              {
                "name": "1234",
                "rollup": true,
                "percentDone": 100,
                
                "startDate": "2011-01-11",
                "endDate": "2011-01-12"
              },
              {
                "name": "12345",
                "rollup": true,
                "percentDone": 100,
                
                "startDate": "2011-01-12",
                "endDate": "2011-01-15"
              }
            ]
          }
        ]
      }
    ]
  },
  
  "dependencies": {
    "rows": []
  }
}
and result:
Screen Shot 2020-04-07 at 09.06.36.png
Screen Shot 2020-04-07 at 09.06.36.png (81.06 KiB) Viewed 2355 times
Could it be that you're pulling different data from somewhere else? Any error messages? Some changes to our demo other than data (I've changed only data for testing)?

Post by spodeopieter2 »

Good day , I did make other modifications to the demo , they are described in the first post , I just enabled the rollups feature. I also modified the calendar in the following way:
  "calendars": {
    "rows": [
      {
        "id": "general",
        "name": "General",

        "intervals": [
          {
            "startDate": "2010-12-31T22:00:00.000Z",
            "endDate": "2011-01-01T22:00:00.000Z",
            "isWorking": false
          },
          {
            "startDate": "2011-01-01T22:00:00.000Z",
            "endDate": "2011-01-02T22:00:00.000Z",
            "isWorking": false
          },
          {
            "startDate": "2011-01-02T22:00:00.000Z",
            "endDate": "2011-01-03T22:00:00.000Z",
            "isWorking": false
          }//...all the way to 2020 (about 3000 records)
          ],
          "expanded" : true
       } 
    ]     
}          
          


But I have found a workaround :
    
    {
                "id": 6503,
                "name": "53302",
                "startDate": "2012-01-24T22:00:00.000Z",
                "duration": 1,
                "rollup": true,
                "manuallyScheduled": true
      },

Post by saki »

Better than a workaround would be to find the real reason. Try to remove your changes one-by-one to see which one causes it. If you think it could be a bug in Gantt please inform us (with the steps to reproduce) and we'll fix it.

Post by spodeopieter2 »

OK cool , I will do that , and let you guys know, I suspect it is enabling the rollup feature ,But will test it the moment I have time.

Post by spodeopieter2 »

Ok , here are my results I only modified launch-saas.json and package.json (to get it to work on windows), I will attach them.

Package.json is modified on line 10

the forum does not accept .json as a valid file format , perhaps something to change ?

perhaps this is a windows issue ?

I am using gantt-vanilla-2.1.1

Here are the results :
PDF.PNG
PDF.PNG (50.76 KiB) Viewed 2349 times
Attachments
launch-saas.txt
(4.72 KiB) Downloaded 123 times

Post by mats »

the forum does not accept .json as a valid file format , perhaps something to change ?
Fixed now

Post by spodeopieter2 »

Cool :)
launch-saas.json
(4.72 KiB) Downloaded 163 times

Post Reply