gantt icon indicating copy to clipboard operation
gantt copied to clipboard

Cannot read property '$bar' of undefined

Open amir-xyz opened this issue 5 years ago • 5 comments

Capture

No mouse events working on the chart

amir-xyz avatar Jul 31 '20 11:07 amir-xyz

In my case this error was caused by using task id as integers changed to string and works. Maybe that helps someone.

wmandai avatar Aug 12 '20 17:08 wmandai

The example sets dependencies 'Task 2, Task 3' which do not exist. This causes that.

arnaudlevy avatar Sep 09 '20 17:09 arnaudlevy

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.

wzulfikar avatar Mar 23 '21 05:03 wzulfikar

The example sets dependencies 'Task 2, Task 3' which do not exist. This causes that.

Yes this is also tha cause.

web-developer032 avatar Dec 31 '21 20:12 web-developer032

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 1649342573(1)

Messilimeng avatar Apr 07 '22 14:04 Messilimeng

@Messilimeng do you still face this issue?

safwansamsudeen avatar Apr 04 '24 20:04 safwansamsudeen

Fixed in #393.

safwansamsudeen avatar Apr 26 '24 02:04 safwansamsudeen