Gantt.init is invalid

When re-rendering data,Gantt will display the last loaded data.

Unfortunately, it is hard to suggest what might be the cause, because there can be a lot of reasons that may affect Gantt behaviour.
I need a sample of your code to see what might be wrong and I’ll try to reproduce it locally. You can modify the following snippet:
After you edit the code and see that it reproduces the error, click on the “Share” button and copy the link for the snippet.

This situation is not very reproducible,I use vue. I am on another page click on a different button and get a different id and there will be different data depending on the id。Then i use gantt.init(this.$refs.gantt); gantt.parse(_this.$props.tasks);
This is part of the code snippet:

        let params = new URLSearchParams();
        let orderId = window.localStorage.getItem('orderId');
        params.append('orderId', JSON.parse(orderId));
        this.$'/api/proPlan/groupPlanTree', params, {emulateJSON: true})
          .then((res) => {
            if ( === true) {
              let data =;
              // let taskData = {};
              let links = [];
              for (const i in data) {
                if (data[i].id === null) {
                  data[i].id = 1234567;
                if (data[i].parent === '0') {
                  data[i].type = 'project';
                data.find(function (item, index) {
                  if (item.parent === data[i].parent && !== data[i].id) {
                    data[i].linksparent =;
                  } else {
                    data[i].linksparent = '';
                // // data[i].id = data[i].id + '_' + i;
                if (data[i].startTime === null) {
                  let startDate = new Date();
                  data[i].start_date = startDate;
                } else {
                  let startDate = new Date(data[i].startTime);
                  data[i].start_date = startDate;
                data[i].duration = 5;
                let linksData = {
                  id: data[i].id,
                  source: data[i].id,
                  target: data[i].parent,
                  type: '0',
                  lag: 0
              let taskData = {
                data: data,
                links: links
              this.tasks = taskData;
          .catch(() => {

This is the data I got three times.

If I understand you correctly, when you load more data, previous data remain. Is that correct? If yes, then it is expected behaviour. When you load more data and there is a task with the same ID as another task, the existing task will be replaced. If there is no such a task, it will be added to existing tasks. To avoid that, before loading new data you can clear all existing data:
In the following snippet you can see how it works. If you click on the “load more data” button, new tasks will be added to the existing tasks. But if you click on the “Load only new data” button, only new tasks will remain in the chart.