gantt
gantt copied to clipboard
Cannot read property '$bar' of undefined
No mouse events working on the chart
In my case this error was caused by using task id as integers changed to string and works. Maybe that helps someone.
The example sets dependencies 'Task 2, Task 3' which do not exist. This causes that.
In my case this error was caused by using task id as integers changed to string and works. Maybe that helps someone.
I can confirm. I changed my id from integer to string and it works.
The example sets dependencies 'Task 2, Task 3' which do not exist. This causes that.
Yes this is also tha cause.
My id is integers ,but i do like this cant work
let dep_list = [];
let data=[...]
data.map((it) => {
let jsons = {
start: it.start_time,
end: it.end_time,
id: "" + it.id,
org_id: it.id,
lineNum: it.lineNum,
state: it.state,
name: "[" + it.name + "]" + it.mo_no,
progress: Number((it.finish_num / it.num).toFixed(1)) * 100,
custom_class: "cost-progress",
};
dep_list.push(jsons);
});
for (let item of dep_list) {
if (item.state == 3) {
let st = dep_list.find(
(x) => x.lineNum == item.lineNum && x.state == 2
);
if (st != undefined && st != null) {
item.dependencies = "" + st.org_id;
} else {
item.dependencies = "";
}
}
}
can you tell me how to do that

@Messilimeng do you still face this issue?
Fixed in #393.