How to add many properties in dhtmlx gantt?











up vote
0
down vote

favorite












what I need to do is:




  1. Load a json file.


  2. Let users to tow the Gantt chart and change value.



I know this:



gantt.load()


can load json file and visualize the info on the chart.



but it only work when I use the test.json:



{
"data":[
{"id":"1", "text":"Project #2", "start_date":"01-04-2013", "duration":18,
"progress":0.4, "open": true},
{"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"},
{"id":"3", "source":"3", "target":"4", "type":"0"},
{"id":"4", "source":"2", "target":"5", "type":"2"}
]}


But my json is more complicated, it is an array of object.



and each object has many items( like :OrdetNum, date, start_date.... )



Below is myjson.json:



 {
"orderFormNumber": "1608T01CY",
"orderNumber": "1608T01CY",
"tasks": "C01*01",
"OriginalTasks": "C01",
"partUnitId": 1,
"sharedCode": "NEWABST",
"processNum": 1,
"processSequence": 1,
"initStartTime": "2018-11-18T16:50:00",
"estimatedTime": 10.833333015441895,
"initEndTime": "2018-11-19T03:39:59",
"estStartTime": "2018-11-15T14:10:00",
"estEndTime": "2018-11-17T07:19:59",
"detailSchedule": null,
"detailSchedulefromCo": null,
"qcSchedule": "2018-11-22T16:30:00",
"fifoStartTime": "2018-11-15T15:44:45",
"fifoEndTime": "2018-11-17T09:34:44",
"acoStartTime": null,
"acoEndTime": null,
"realStartTime": null,
"realEndTime": null,
"processType": "M",
"machineGroup": "M",
"machineGroupSelection": "M",
"prePart": null,
"fifoSelectedMachine": "M02",
"acoSelectedMachine": null,
"designChangesNumber": "1608T01CY",
"machineingStates": 0 }


But it is only one of many objects.



So how can I use gantt.load() to visualize my json file?










share|improve this question




























    up vote
    0
    down vote

    favorite












    what I need to do is:




    1. Load a json file.


    2. Let users to tow the Gantt chart and change value.



    I know this:



    gantt.load()


    can load json file and visualize the info on the chart.



    but it only work when I use the test.json:



    {
    "data":[
    {"id":"1", "text":"Project #2", "start_date":"01-04-2013", "duration":18,
    "progress":0.4, "open": true},
    {"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"},
    {"id":"3", "source":"3", "target":"4", "type":"0"},
    {"id":"4", "source":"2", "target":"5", "type":"2"}
    ]}


    But my json is more complicated, it is an array of object.



    and each object has many items( like :OrdetNum, date, start_date.... )



    Below is myjson.json:



     {
    "orderFormNumber": "1608T01CY",
    "orderNumber": "1608T01CY",
    "tasks": "C01*01",
    "OriginalTasks": "C01",
    "partUnitId": 1,
    "sharedCode": "NEWABST",
    "processNum": 1,
    "processSequence": 1,
    "initStartTime": "2018-11-18T16:50:00",
    "estimatedTime": 10.833333015441895,
    "initEndTime": "2018-11-19T03:39:59",
    "estStartTime": "2018-11-15T14:10:00",
    "estEndTime": "2018-11-17T07:19:59",
    "detailSchedule": null,
    "detailSchedulefromCo": null,
    "qcSchedule": "2018-11-22T16:30:00",
    "fifoStartTime": "2018-11-15T15:44:45",
    "fifoEndTime": "2018-11-17T09:34:44",
    "acoStartTime": null,
    "acoEndTime": null,
    "realStartTime": null,
    "realEndTime": null,
    "processType": "M",
    "machineGroup": "M",
    "machineGroupSelection": "M",
    "prePart": null,
    "fifoSelectedMachine": "M02",
    "acoSelectedMachine": null,
    "designChangesNumber": "1608T01CY",
    "machineingStates": 0 }


    But it is only one of many objects.



    So how can I use gantt.load() to visualize my json file?










    share|improve this question


























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      what I need to do is:




      1. Load a json file.


      2. Let users to tow the Gantt chart and change value.



      I know this:



      gantt.load()


      can load json file and visualize the info on the chart.



      but it only work when I use the test.json:



      {
      "data":[
      {"id":"1", "text":"Project #2", "start_date":"01-04-2013", "duration":18,
      "progress":0.4, "open": true},
      {"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"},
      {"id":"3", "source":"3", "target":"4", "type":"0"},
      {"id":"4", "source":"2", "target":"5", "type":"2"}
      ]}


      But my json is more complicated, it is an array of object.



      and each object has many items( like :OrdetNum, date, start_date.... )



      Below is myjson.json:



       {
      "orderFormNumber": "1608T01CY",
      "orderNumber": "1608T01CY",
      "tasks": "C01*01",
      "OriginalTasks": "C01",
      "partUnitId": 1,
      "sharedCode": "NEWABST",
      "processNum": 1,
      "processSequence": 1,
      "initStartTime": "2018-11-18T16:50:00",
      "estimatedTime": 10.833333015441895,
      "initEndTime": "2018-11-19T03:39:59",
      "estStartTime": "2018-11-15T14:10:00",
      "estEndTime": "2018-11-17T07:19:59",
      "detailSchedule": null,
      "detailSchedulefromCo": null,
      "qcSchedule": "2018-11-22T16:30:00",
      "fifoStartTime": "2018-11-15T15:44:45",
      "fifoEndTime": "2018-11-17T09:34:44",
      "acoStartTime": null,
      "acoEndTime": null,
      "realStartTime": null,
      "realEndTime": null,
      "processType": "M",
      "machineGroup": "M",
      "machineGroupSelection": "M",
      "prePart": null,
      "fifoSelectedMachine": "M02",
      "acoSelectedMachine": null,
      "designChangesNumber": "1608T01CY",
      "machineingStates": 0 }


      But it is only one of many objects.



      So how can I use gantt.load() to visualize my json file?










      share|improve this question















      what I need to do is:




      1. Load a json file.


      2. Let users to tow the Gantt chart and change value.



      I know this:



      gantt.load()


      can load json file and visualize the info on the chart.



      but it only work when I use the test.json:



      {
      "data":[
      {"id":"1", "text":"Project #2", "start_date":"01-04-2013", "duration":18,
      "progress":0.4, "open": true},
      {"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"},
      {"id":"3", "source":"3", "target":"4", "type":"0"},
      {"id":"4", "source":"2", "target":"5", "type":"2"}
      ]}


      But my json is more complicated, it is an array of object.



      and each object has many items( like :OrdetNum, date, start_date.... )



      Below is myjson.json:



       {
      "orderFormNumber": "1608T01CY",
      "orderNumber": "1608T01CY",
      "tasks": "C01*01",
      "OriginalTasks": "C01",
      "partUnitId": 1,
      "sharedCode": "NEWABST",
      "processNum": 1,
      "processSequence": 1,
      "initStartTime": "2018-11-18T16:50:00",
      "estimatedTime": 10.833333015441895,
      "initEndTime": "2018-11-19T03:39:59",
      "estStartTime": "2018-11-15T14:10:00",
      "estEndTime": "2018-11-17T07:19:59",
      "detailSchedule": null,
      "detailSchedulefromCo": null,
      "qcSchedule": "2018-11-22T16:30:00",
      "fifoStartTime": "2018-11-15T15:44:45",
      "fifoEndTime": "2018-11-17T09:34:44",
      "acoStartTime": null,
      "acoEndTime": null,
      "realStartTime": null,
      "realEndTime": null,
      "processType": "M",
      "machineGroup": "M",
      "machineGroupSelection": "M",
      "prePart": null,
      "fifoSelectedMachine": "M02",
      "acoSelectedMachine": null,
      "designChangesNumber": "1608T01CY",
      "machineingStates": 0 }


      But it is only one of many objects.



      So how can I use gantt.load() to visualize my json file?







      json dhtmlx gantt-chart






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 19 at 12:21

























      asked Nov 19 at 12:15









      PinHsueh Li

      41




      41





























          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53374431%2fhow-to-add-many-properties-in-dhtmlx-gantt%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53374431%2fhow-to-add-many-properties-in-dhtmlx-gantt%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          404 Error Contact Form 7 ajax form submitting

          How to know if a Active Directory user can login interactively

          TypeError: fit_transform() missing 1 required positional argument: 'X'