Recalculation of Dependants causing task shift

Sep 11, 2013 at 6:43 AM
Hello.

In the Gantt chart example Task 'Brush Teeth' is related to task 'Wake up'. 'Wake up' ends on Thursday, however 'Brush Teeth' starts on Friday. What happens between Thursday and Friday?

I have created several tasks and put them in the chart. Each one starts when another one ends. The chart is correct. But when I relate the tasks using Relate(..), it shifts in a day between each task.. Resulting an incorrect chart. It seems like _RecalculateDependantsOf() inside Relate is generating the shift. If I don't recalculate the dependants inside Relate, the chart is correct again and the relations are drawn. Is there an option or parameter that can be set to avoid the shift in stead of changing the source?

Thanks
Coordinator
Sep 11, 2013 at 7:41 AM
Hello Code_Plex_User,

In this chart, the smallest resolution is in days. Hence there are no days between Thursday and Friday. Wake up ends and Brush Teeth starts.

In practice, a task can end in the middle of a day and then the next task starts immediately on the same day. However, the chart can only count in full days, therefore related tasks must end and start on different days.

Also, you find that tasks must at least take 1 day to complete.

There is no parameter to set to avoid this, other than a fundamental change to the resolution handling.
Nov 4, 2014 at 1:10 PM
Edited Nov 4, 2014 at 1:24 PM
@jakesee: Could you please guide me to start make fundamental change to the resolution handling( to handle resolution in minutes), I need it in my project
Jul 17, 2015 at 6:48 PM
I've stared some work on sub day units. I have the same issue. I need to work in seconds or minutes. I don't know if I can solve the problem, but I'm going to try.

Jacob
Coordinator
Jul 18, 2015 at 7:11 AM
Hi msanaei,

You will have to modify the entire private draw function in Chart._Draw(Graphics, Rectangle clipRect) and reinterpret the properties of Task e.g.. Start, End, Duration etc. to suit your needs.