Gantt Chart Duration Calculation Problem

258 views
Skip to first unread message

ActiveX

unread,
Sep 21, 2016, 1:19:16 PM9/21/16
to Google Visualization API
All,

We're using Google Gantt chart in our project management software to display scheduled tasks. The problem is that when a task begins, for ex: on Sep 21 and ends on Sep 21, the gantt chart calculates this to have  a duration of 0 days which in the context of scheduling is incorrect. A day still has 24 hours and this task has a duration of 1 days.

As a workaround, I decided to calculate the duration myself, ie. I specified in my json start/end dates and duration but the gantt chart ignores my duration and simply subtracts the dates and returns 0 days for the duration. This is weird because the documentation says otherwise (from docs: If start/end/duration all present - Check that duration is consistent with start/end times. Throws error if inconsistent.)

You might say, why I don't add +1 day to end date,- yes that will fix the duration calculation but now the displayed end date will be wrong.

At the minimum the Gantt chart should allow me to override the duration. In the future, I think it would be great if the Gantt chart supported date/time or would handle the calculations in 2 different ways (or modes if you like).

Any suggestions would be appreciated.

Thanks,

lk

ActiveX

unread,
Sep 21, 2016, 1:48:47 PM9/21/16
to Google Visualization API
Just to add to my post above:

Even if I can override the duration calculation, the rendering of a task for single day would be incorrect. Since it thinks single day task has duration of 0 days, the visual bar on the chart would not render. I could possibly live w/ that for the time being until google introduce time component to the gantt chart.

lk

ActiveX

unread,
Sep 26, 2016, 8:41:40 PM9/26/16
to Google Visualization API
No response yet, can I at least have a comment from google team if duration calculation/time rendering will be in the up-coming future releases?

Thanks,

lk

ActiveX

unread,
Sep 28, 2016, 5:16:45 PM9/28/16
to Google Visualization API
I would like to clarify few points. 

Overall, the Gantt chart works correctly. In a situation where the task start/ends on the same day I simply decided to add +1 day to the end date and it renders correctly on the time line. The only thing that is confusing to our users is the display of the date range in the tooltip (which goes for a single day, for ex: sep 30 - oct 1, instead of what's displayed in our system sep 30 - sep 30).  This issue can be resolved if time was added to the Gantt chart then I could add +1 day and subtract -1 sec. Rendering would be more accurate and displayed date range would be correct.
Are there plans to add time to the Gantt chart?

lk

Che Xuian

unread,
Apr 7, 2020, 11:14:18 PM4/7/20
to Google Visualization API
Hi, may i know did you find a way to solve it? Thank You.
Reply all
Reply to author
Forward
0 new messages