- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.2k
Closed
Description
Bar draw starts and ends using only the hour as parameter.
I changed the code to use minutes.
At bar.js
  compute_x() {
    const { step, column_width } = this.gantt.options;
    const task_start = this.task._start;
    const gantt_start = this.gantt.gantt_start;
    const diff = date_utils.diff(task_start, gantt_start, "minutes");
    let x = (diff / 60 / step) * column_width;
    if (this.gantt.view_is("Month")) {
      const diff = date_utils.diff(task_start, gantt_start, "day");
      x = (diff * column_width) / 30;
    }
    this.x = Math.floor(x);
  }
  compute_duration() {
    this.duration =
      date_utils.diff(this.task._end, this.task._start, "minute") / 60 /
      this.gantt.options.step;
  }
Metadata
Metadata
Assignees
Labels
No labels
