DHTMLX/gantt

Issue with parse data get by axios

grifin85 opened this issue · 3 comments

Hi,
I use dhmlx-gantt: 8.0.1 free, for get data I use Axios, but when I try to parse data

gantt.parse({
data: array
});

I get the error:
Cannot read properties of undefined (reading 'length'

If I use the load function from the same source it's ok or if I put this data how static also ok

Hello,
Unfortunately, it's hard to say what the problem might be without more details. Could you provide access to the application or send a test app so I can investigate further?

Here are a couple of examples:
https://snippet.dhtmlx.com/tx1b4qr1
https://snippet.dhtmlx.com/e8cnbxs7

Perhaps they will be helpful for you.

The gantt.parse() method expects an array of data to be provided, and it seems that it is encountering an issue when trying to access the 'length' property of the array

example-
const array = [
{ id: 1, text: "Task 1", start_date: "2023-08-03", duration: 5 },
{ id: 2, text: "Task 2", start_date: "2023-08-08", duration: 3 },
];

gantt.parse({
data: array,
});

double check your code ,and have a look on your code and my code , is this similar or not
if you will provide the code , i can go through that