Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with parse data get by axios #95

Open
grifin85 opened this issue May 31, 2023 · 2 comments
Open

Issue with parse data get by axios #95

grifin85 opened this issue May 31, 2023 · 2 comments

Comments

@grifin85
Copy link

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

@MaksimLakatkouXBS
Copy link

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.

@Krishkumarchhabra25
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants